Back to index

salome-geom  6.5.0
AdvancedGUI.cxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // This library is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU Lesser General Public
00005 // License as published by the Free Software Foundation; either
00006 // version 2.1 of the License.
00007 //
00008 // This library is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 // Lesser General Public License for more details.
00012 //
00013 // You should have received a copy of the GNU Lesser General Public
00014 // License along with this library; if not, write to the Free Software
00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00016 //
00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00018 //
00019 
00020 //  File   : AdvancedGUI.cxx
00021 //  Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
00022 //
00023 #include "AdvancedGUI.h"
00024 
00025 #include "GeometryGUI.h"
00026 #include "GeometryGUI_Operations.h"
00027 
00028 #include <SUIT_Desktop.h>
00029 #include <SalomeApp_Application.h>
00030 
00031 #include "AdvancedGUI_PipeTShapeDlg.h"
00032 //@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@//
00033 
00034 #include <QDialog>
00035 
00036 //=======================================================================
00037 // function : AdvancedGUI()
00038 // purpose  : Constructor
00039 //=======================================================================
00040 AdvancedGUI::AdvancedGUI( GeometryGUI* parent ) : GEOMGUI( parent )
00041 {
00042 }
00043 
00044 //=======================================================================
00045 // function : ~AdvancedGUI
00046 // purpose  : Destructor
00047 //=======================================================================
00048 AdvancedGUI::~AdvancedGUI()
00049 {
00050 }
00051 
00052 //=======================================================================
00053 // function : OnGUIEvent()
00054 // purpose  : 
00055 //=======================================================================
00056 bool AdvancedGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent )
00057 {
00058   SalomeApp_Application* app = getGeometryGUI()->getApp();
00059   if ( !app ) return false;
00060 
00061   getGeometryGUI()->EmitSignalDeactivateDialog();
00062 
00063   QDialog* aDlg = NULL;
00064 
00065   switch ( theCommandID ) {
00066   case GEOMOp::OpPipeTShape:
00067     aDlg = new AdvancedGUI_PipeTShapeDlg( getGeometryGUI(), parent );
00068     break;
00069 //   case GEOMOp::OpPipeTShapeGroups:
00070 //     aDlg = new AdvancedGUI_PipeTShapeGroupsDlg( getGeometryGUI(), parent );
00071 //     break;
00072   //@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@//
00073   default:
00074     app->putInfo( tr( "GEOM_PRP_COMMAND" ).arg( theCommandID ) );
00075     break;
00076   }
00077 
00078   if ( aDlg != NULL )
00079     aDlg->show();
00080 
00081   return true;
00082 }
00083 
00084 //=====================================================================================
00085 // EXPORTED METHODS
00086 //=====================================================================================
00087 extern "C"
00088 {
00089 #ifdef WIN32
00090   __declspec( dllexport )
00091 #endif
00092   GEOMGUI* GetLibGUI( GeometryGUI* parent )
00093   {
00094     return new AdvancedGUI( parent );
00095   }
00096 }