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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : GEOMContext.h
25 // Author : Damien COQUERET
32 #include "QAD_Desktop.h"
33 #include "GEOM_Client.hxx"
34 #include "GEOM_Sketcher.h"
35 #include <OSD_SharedLibrary.hxx>
36 #include <qapplication.h>
38 //=================================================================================
39 // class : GEOMContext
41 //=================================================================================
42 class GEOMContext : public QObject
44 Q_OBJECT /* for QT compatibility */
51 QDialog* myActiveDialogBox; /* Unique active dialog box */
52 int myNbGeom; /* Unique name for a geom entity */
53 GEOM_Client myShapeReader;
54 Standard_CString myFatherior;
58 static GEOMContext* GetOrCreateGeomGUI(QAD_Desktop* desktop);
59 static GEOMContext* GetGeomGUI();
61 OSD_SharedLibrary myGUILibrary;
62 GEOM::GEOM_Gen_var myComponentGeom;
63 int myState; /* Identify a method */
65 /* Returns the active DialogBox */
66 QDialog* GetActiveDialogBox(){return myActiveDialogBox ;};
67 int& GetNbGeom(){return myNbGeom;};
68 GEOM_Client& GetShapeReader(){return myShapeReader;};
69 Standard_CString& GetFatherior(){return myFatherior;};
70 Sketch& GetSketcher(){return mySketcher;};
72 bool LoadLibrary(QString GUILibrary);
74 /* Sets 'myActiveDialogBox' a pointer to the active Dialog Box */
75 void SetActiveDialogBox(QDialog* aDlg);
77 /* Non modal dialog boxes magement */
78 void EmitSignalDeactivateDialog();
79 void EmitSignalCloseAllDialogs();
80 void EmitSignalDefaultStepValueChanged(double newVal);
83 void SignalDeactivateActiveDialog();
84 void SignalCloseAllDialogs();
85 void SignalDefaultStepValueChanged(double newVal);