Salome HOME
0021147: EDF GEOM: Difference between compound of line and compound of edges
[modules/geom.git] / src / AdvancedGUI / AdvancedGUI.cxx
1 //  Copyright (C) 2007-2010  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 //@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@//
33
34 #include <QDialog>
35
36 //=======================================================================
37 // function : AdvancedGUI()
38 // purpose  : Constructor
39 //=======================================================================
40 AdvancedGUI::AdvancedGUI( GeometryGUI* parent ) : GEOMGUI( parent )
41 {
42 }
43
44 //=======================================================================
45 // function : ~AdvancedGUI
46 // purpose  : Destructor
47 //=======================================================================
48 AdvancedGUI::~AdvancedGUI()
49 {
50 }
51
52 //=======================================================================
53 // function : OnGUIEvent()
54 // purpose  : 
55 //=======================================================================
56 bool AdvancedGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent )
57 {
58   SalomeApp_Application* app = getGeometryGUI()->getApp();
59   if ( !app ) return false;
60
61   getGeometryGUI()->EmitSignalDeactivateDialog();
62
63   QDialog* aDlg = NULL;
64
65   switch ( theCommandID ) {
66   case GEOMOp::OpPipeTShape:
67     aDlg = new AdvancedGUI_PipeTShapeDlg( getGeometryGUI(), parent );
68     break;
69 //   case GEOMOp::OpPipeTShapeGroups:
70 //     aDlg = new AdvancedGUI_PipeTShapeGroupsDlg( getGeometryGUI(), parent );
71 //     break;
72   //@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@//
73   default:
74     app->putInfo( tr( "GEOM_PRP_COMMAND" ).arg( theCommandID ) );
75     break;
76   }
77
78   if ( aDlg != NULL )
79     aDlg->show();
80
81   return true;
82 }
83
84 //=====================================================================================
85 // EXPORTED METHODS
86 //=====================================================================================
87 extern "C"
88 {
89 #ifdef WIN32
90   __declspec( dllexport )
91 #endif
92   GEOMGUI* GetLibGUI( GeometryGUI* parent )
93   {
94     return new AdvancedGUI( parent );
95   }
96 }