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 : TransformationGUI.cxx
25 // Author : Damien COQUERET
29 #include "TransformationGUI.h"
30 #include "GeometryGUI.h"
32 #include "SUIT_Session.h"
33 #include "SUIT_Desktop.h"
35 #include "TransformationGUI_MultiTranslationDlg.h" // Method MULTI TRANSLATION
36 #include "TransformationGUI_MultiRotationDlg.h" // Method MULTI ROTATION
37 #include "TransformationGUI_TranslationDlg.h" // Method TRANSLATION
38 #include "TransformationGUI_RotationDlg.h" // Method ROTATION
39 #include "TransformationGUI_MirrorDlg.h" // Method MIRROR
40 #include "TransformationGUI_ScaleDlg.h" // Method SCALE
41 #include "TransformationGUI_OffsetDlg.h" // Method OFFSET
42 #include "TransformationGUI_PositionDlg.h" // Method POSITION
46 TransformationGUI* TransformationGUI::myGUIObject = 0;
48 //=======================================================================
49 // function : GetTransformationGUI()
50 // purpose : Get the only TransformationGUI object [ static ]
51 //=======================================================================
52 TransformationGUI* TransformationGUI::GetTransformationGUI( GeometryGUI* parent )
54 if ( myGUIObject == 0 ) {
55 // init TransformationGUI only once
56 myGUIObject = new TransformationGUI( parent );
61 //=======================================================================
62 // function : TransformationGUI()
63 // purpose : Constructor
64 //=======================================================================
65 TransformationGUI::TransformationGUI(GeometryGUI* parent) : GEOMGUI(parent)
70 //=======================================================================
71 // function : ~TransformationGUI()
72 // purpose : Destructor
73 //=======================================================================
74 TransformationGUI::~TransformationGUI()
79 //=======================================================================
80 // function : OnGUIEvent()
82 //=======================================================================
83 bool TransformationGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent)
85 getGeometryGUI()->EmitSignalDeactivateDialog();
90 case 5021: // TRANSLATION
91 aDlg = new TransformationGUI_TranslationDlg( getGeometryGUI(), parent, "" );
93 case 5022: // ROTATION
94 aDlg = new TransformationGUI_RotationDlg( getGeometryGUI(), parent, "" );
96 case 5023: // POSITION
97 aDlg = new TransformationGUI_PositionDlg( getGeometryGUI(), parent, "" );
100 aDlg = new TransformationGUI_MirrorDlg( getGeometryGUI(), parent, "" );
103 aDlg = new TransformationGUI_ScaleDlg( getGeometryGUI(), parent, "" );
106 aDlg = new TransformationGUI_OffsetDlg( getGeometryGUI(), parent, "" );
108 case 5027: // MULTI TRANSLATION
109 aDlg = new TransformationGUI_MultiTranslationDlg( getGeometryGUI(), parent, "" );
111 case 5028: // MULTI ROTATION
112 aDlg = new TransformationGUI_MultiRotationDlg( getGeometryGUI(), parent, "" );
115 SUIT_Session::session()->activeApplication()->putInfo(tr("GEOM_PRP_COMMAND").arg(theCommandID));
126 //=====================================================================================
128 //=====================================================================================
132 __declspec( dllexport )
134 GEOMGUI* GetLibGUI( GeometryGUI* parent )
136 return TransformationGUI::GetTransformationGUI( parent );