1 // GEOM GEOMGUI : GUI for Geometry component
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
24 // File : OperationGUI.cxx
25 // Author : Damien COQUERET
29 #include "OperationGUI.h"
31 #include "SUIT_Session.h"
32 #include "SUIT_Desktop.h"
33 #include "SalomeApp_Application.h"
35 #include <TopTools_MapOfShape.hxx>
36 #include <TopExp_Explorer.hxx>
37 #include <Precision.hxx>
39 #include "OperationGUI_PartitionDlg.h" // Method PARTITION
40 #include "OperationGUI_ArchimedeDlg.h" // Method ARCHIMEDE
41 #include "OperationGUI_FilletDlg.h" // Method FILLET
42 #include "OperationGUI_ChamferDlg.h" // Method CHAMFER
44 #include "OperationGUI_ClippingDlg.h"
48 OperationGUI* OperationGUI::myGUIObject = 0;
50 //=======================================================================
51 // function : GetOperationGUI()
52 // purpose : Get the only OperationGUI object [ static ]
53 //=======================================================================
54 OperationGUI* OperationGUI::GetOperationGUI( GeometryGUI* parent )
56 if ( myGUIObject == 0 ) {
57 // init OperationGUI only once
58 myGUIObject = new OperationGUI( parent );
63 //=======================================================================
64 // function : OperationGUI()
65 // purpose : Constructor
66 //=======================================================================
67 OperationGUI::OperationGUI(GeometryGUI* parent) : GEOMGUI(parent)
72 //=======================================================================
73 // function : ~OperationGUI()
74 // purpose : Destructor
75 //=======================================================================
76 OperationGUI::~OperationGUI()
81 //=======================================================================
82 // function : OnGUIEvent()
84 //=======================================================================
85 bool OperationGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent )
87 getGeometryGUI()->EmitSignalDeactivateDialog();
91 case 503: (new OperationGUI_PartitionDlg(getGeometryGUI(), parent))->show(); break;
92 case 504: (new OperationGUI_ArchimedeDlg(getGeometryGUI(), parent))->show(); break;
93 case 505: (new OperationGUI_FilletDlg (getGeometryGUI(), parent))->show(); break;
94 case 506: (new OperationGUI_ChamferDlg (getGeometryGUI(), parent))->show(); break;
95 case 507: (new OperationGUI_ClippingDlg (getGeometryGUI(), parent))->show(); break;
97 getGeometryGUI()->getApp()->putInfo(tr("GEOM_PRP_COMMAND").arg(theCommandID));
103 //=====================================================================================
105 //=====================================================================================
109 __declspec( dllexport )
111 GEOMGUI* GetLibGUI(GeometryGUI* parent)
113 return OperationGUI::GetOperationGUI(parent);