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 : 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>
38 #if defined GEOMCONTEXT_EXPORTS
40 #define GEOM_CONTEXT_EXPORT __declspec( dllexport )
42 #define GEOM_CONTEXT_EXPORT
46 #define GEOM_CONTEXT_EXPORT __declspec( dllimport )
48 #define GEOM_CONTEXT_EXPORT
52 #define GEOM_CONTEXT_EXPORT
55 //=================================================================================
56 // class : GEOMContext
58 //=================================================================================
59 class GEOM_CONTEXT_EXPORT GEOMContext : public QObject
61 Q_OBJECT /* for QT compatibility */
68 QDialog* myActiveDialogBox; /* Unique active dialog box */
69 GEOM_Client myShapeReader;
70 Standard_CString myFatherior;
73 int myNbGeom; /* Unique name for a geom entity */
75 static GEOMContext* GetOrCreateGeomGUI(QAD_Desktop* desktop);
76 static GEOMContext* GetGeomGUI();
78 OSD_SharedLibrary myGUILibrary;
79 GEOM::GEOM_Gen_var myComponentGeom;
80 int myState; /* Identify a method */
82 /* Returns the active DialogBox */
83 QDialog* GetActiveDialogBox(){return myActiveDialogBox ;};
84 int& GetNbGeom(){return myNbGeom;};
85 GEOM_Client& GetShapeReader(){return myShapeReader;};
86 Standard_CString& GetFatherior(){return myFatherior;};
88 bool LoadLibrary(QString GUILibrary);
90 /* Sets 'myActiveDialogBox' a pointer to the active Dialog Box */
91 void SetActiveDialogBox(QDialog* aDlg);
93 /* Non modal dialog boxes magement */
94 void EmitSignalDeactivateDialog();
95 void EmitSignalCloseAllDialogs();
96 void EmitSignalDefaultStepValueChanged(double newVal);
99 void SignalDeactivateActiveDialog();
100 void SignalCloseAllDialogs();
101 void SignalDefaultStepValueChanged(double newVal);