]> SALOME platform Git repositories - modules/geom.git/blob - src/GEOMContext/GEOMContext.h
Salome HOME
DCQ : New Architecture
[modules/geom.git] / src / GEOMContext / GEOMContext.h
1 //  GEOMCONTEXT
2 //
3 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
5 // 
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. 
10 // 
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. 
15 // 
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 
19 // 
20 //  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
21 //
22 //
23 //
24 //  File   : GEOMContext.h
25 //  Author : Damien COQUERET
26 //  Module : GEOM
27 //  $Header: 
28
29 #ifndef GEOMCONTEXT_H
30 #define GEOMCONTEXT_H
31
32 #include "QAD_Desktop.h"
33 #include "GEOM_Client.hxx"
34 #include "GEOM_Sketcher.h"
35 #include <OSD_SharedLibrary.hxx>
36 #include <qapplication.h>
37
38 //=================================================================================
39 // class    : GEOMContext
40 // purpose  :
41 //=================================================================================
42 class GEOMContext : public QObject
43 {
44   Q_OBJECT /* for QT compatibility */
45
46 public :
47   GEOMContext();
48   ~GEOMContext();
49
50 private :
51   QDialog* myActiveDialogBox; /* Unique active dialog box */
52   int myNbGeom; /* Unique name for a geom entity */
53   GEOM_Client myShapeReader;
54   Standard_CString myFatherior;
55   Sketch mySketcher;
56
57 public :
58   static GEOMContext* GetOrCreateGeomGUI(QAD_Desktop* desktop);
59   static GEOMContext* GetGeomGUI();
60
61   OSD_SharedLibrary myGUILibrary;
62   GEOM::GEOM_Gen_var myComponentGeom;
63   int myState; /* Identify a method */
64
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;};
71
72   bool LoadLibrary(QString GUILibrary);
73
74   /* Sets 'myActiveDialogBox' a pointer to the active Dialog Box  */
75   void SetActiveDialogBox(QDialog* aDlg);
76
77   /* Non modal dialog boxes magement */
78   void EmitSignalDeactivateDialog();
79   void EmitSignalCloseAllDialogs();
80   void EmitSignalDefaultStepValueChanged(double newVal);
81
82 signals :
83   void SignalDeactivateActiveDialog();
84   void SignalCloseAllDialogs();
85   void SignalDefaultStepValueChanged(double newVal);
86
87 };
88
89 #endif
90