]> SALOME platform Git repositories - modules/geom.git/blob - src/AdvancedGUI/AdvancedGUI.cxx
Salome HOME
0021684: EDF 2221 : Display the arguments and the name of the operations
[modules/geom.git] / src / AdvancedGUI / AdvancedGUI.cxx
1 // Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 //  File   : AdvancedGUI.cxx
21 //  Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
22 //
23 #include "AdvancedGUI.h"
24
25 #include "GeometryGUI.h"
26 #include "GeometryGUI_Operations.h"
27
28 #include <SUIT_Desktop.h>
29 #include <SalomeApp_Application.h>
30
31 #include "AdvancedGUI_PipeTShapeDlg.h"
32 #include "AdvancedGUI_DividedDiskDlg.h"
33 #include "AdvancedGUI_DividedCylinderDlg.h"
34 #include "AdvancedGUI_SmoothingSurfaceDlg.h"
35 //@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@//
36
37 #include <QDialog>
38
39 //=======================================================================
40 // function : AdvancedGUI()
41 // purpose  : Constructor
42 //=======================================================================
43 AdvancedGUI::AdvancedGUI( GeometryGUI* parent ) : GEOMGUI( parent )
44 {
45 }
46
47 //=======================================================================
48 // function : ~AdvancedGUI
49 // purpose  : Destructor
50 //=======================================================================
51 AdvancedGUI::~AdvancedGUI()
52 {
53 }
54
55 //=======================================================================
56 // function : OnGUIEvent()
57 // purpose  : 
58 //=======================================================================
59 bool AdvancedGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent )
60 {
61   SalomeApp_Application* app = getGeometryGUI()->getApp();
62   if ( !app ) return false;
63
64   getGeometryGUI()->EmitSignalDeactivateDialog();
65
66   QDialog* aDlg = NULL;
67
68   switch ( theCommandID ) {
69   case GEOMOp::OpPipeTShape:
70     aDlg = new AdvancedGUI_PipeTShapeDlg( getGeometryGUI(), parent );
71     break;
72 //   case GEOMOp::OpPipeTShapeGroups:
73 //     aDlg = new AdvancedGUI_PipeTShapeGroupsDlg( getGeometryGUI(), parent );
74 //     break;
75   case GEOMOp::OpDividedDisk:
76     aDlg = new AdvancedGUI_DividedDiskDlg( getGeometryGUI(), parent );
77     break;
78   case GEOMOp::OpDividedCylinder:
79     aDlg = new AdvancedGUI_DividedCylinderDlg( getGeometryGUI(), parent );
80     break;
81   case GEOMOp::OpSmoothingSurface:
82     aDlg = new AdvancedGUI_SmoothingSurfaceDlg( getGeometryGUI(), parent );
83     break;
84   //@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@//
85   default:
86     app->putInfo( tr( "GEOM_PRP_COMMAND" ).arg( theCommandID ) );
87     break;
88   }
89
90   if ( aDlg != NULL )
91     aDlg->show();
92
93   return true;
94 }
95
96 //=====================================================================================
97 // EXPORTED METHODS
98 //=====================================================================================
99 extern "C"
100 {
101 #ifdef WIN32
102   __declspec( dllexport )
103 #endif
104   GEOMGUI* GetLibGUI( GeometryGUI* parent )
105   {
106     return new AdvancedGUI( parent );
107   }
108 }