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 <OSD_SharedLibrary.hxx>
35 #include <qapplication.h>
37 //=================================================================================
38 // class : GEOMContext
40 //=================================================================================
41 class GEOMContext : public QObject
43 Q_OBJECT /* for QT compatibility */
50 QDialog* myActiveDialogBox; /* Unique active dialog box */
51 GEOM_Client myShapeReader;
52 Standard_CString myFatherior;
55 int myNbGeom; /* Unique name for a geom entity */
57 static GEOMContext* GetOrCreateGeomGUI(QAD_Desktop* desktop);
58 static GEOMContext* GetGeomGUI();
60 OSD_SharedLibrary myGUILibrary;
61 GEOM::GEOM_Gen_var myComponentGeom;
62 int myState; /* Identify a method */
64 /* Returns the active DialogBox */
65 QDialog* GetActiveDialogBox(){return myActiveDialogBox ;};
66 int& GetNbGeom(){return myNbGeom;};
67 GEOM_Client& GetShapeReader(){return myShapeReader;};
68 Standard_CString& GetFatherior(){return myFatherior;};
70 bool LoadLibrary(QString GUILibrary);
72 /* Sets 'myActiveDialogBox' a pointer to the active Dialog Box */
73 void SetActiveDialogBox(QDialog* aDlg);
75 /* Non modal dialog boxes magement */
76 void EmitSignalDeactivateDialog();
77 void EmitSignalCloseAllDialogs();
78 void EmitSignalDefaultStepValueChanged(double newVal);
81 void SignalDeactivateActiveDialog();
82 void SignalCloseAllDialogs();
83 void SignalDefaultStepValueChanged(double newVal);