Salome HOME
NRI : First integration.
[modules/geom.git] / src / GEOMGUI / GeometryGUI_FillingHoleDlg.h
1 //  File      : GeometryGUI_FillingHoleDlg.h
2 //  Created   :
3 //  Author    : Lucien PIGNOLONI
4 //  Project   : SALOME
5 //  Module    : GeometryGUI
6 //  Copyright : OPEN CASCADE
7 //  $Header$
8
9
10 #ifndef GEOMETRYGUI_FILLINGHOLE_H
11 #define GEOMETRYGUI_FILLINGHOLE_H
12
13 #include "SALOME_Selection.h"
14 #include "GEOM_ShapeTypeFilter.hxx"
15
16 #include <qvariant.h>
17 #include <qdialog.h>
18
19 #include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
20
21 class QVBoxLayout; 
22 class QHBoxLayout; 
23 class QGridLayout; 
24 class QButtonGroup;
25 class QCheckBox;
26 class QGroupBox;
27 class QLabel;
28 class QLineEdit;
29 class QPushButton;
30 class QRadioButton;
31 class GeometryGUI;
32
33
34 //=================================================================================
35 // class    : GeometryGUI_FillingHoleDlg
36 // purpose  :
37 //=================================================================================
38 class GeometryGUI_FillingHoleDlg : public QDialog
39
40     Q_OBJECT
41
42 public :
43     GeometryGUI_FillingHoleDlg( QWidget* parent = 0,
44                                 const char* name = 0,
45                                 SALOME_Selection* Sel = 0,              
46                                 Handle (AIS_InteractiveContext) ic = 0,       
47                                 bool modal = FALSE,
48                                 WFlags fl = 0 );
49
50     ~GeometryGUI_FillingHoleDlg();
51
52 private :
53       
54     void Init( SALOME_Selection* Sel, Handle (AIS_InteractiveContext) ic ) ;
55     void closeEvent( QCloseEvent* e ) ;
56     void enterEvent ( QEvent * ) ;                /* mouse enter the QWidget */
57     void ResetStateOfDialog() ;
58     
59     /* Interactive and local context management see also : bool myUseLocalContext() */
60     Handle (AIS_InteractiveContext) myIC ;                 /* Interactive context */ 
61     Standard_Integer                myLocalContextId ;     /* identify a local context used by this method */
62     bool                            myUseLocalContext ;    /* true when this method as opened a local context  */
63
64     GEOM::GEOM_Gen_var           myGeom ;                /* Current Geom object */
65     GeometryGUI*                    myGeomGUI ;             /* Current GeomGUI object */
66     SALOME_Selection*               mySelection ;           /* User shape selection */
67
68     TopoDS_Shape                    myShape ;
69     char*                           myShapeIOR ;
70     bool                            myOkShape ;
71
72     bool                            myOkSelectSubMode ;     /* true = sub mode selection activated */
73     QLineEdit*                      myEditCurrentArgument;  /* Current LineEdit */   
74     int                             myConstructorId ;       /* Current constructor id = radio button id */
75  
76     QButtonGroup* GroupConstructors;
77     QRadioButton* Constructor1;
78
79     QGroupBox* GroupC1;
80     QLabel* TextLabelC1A1;
81     QPushButton* SelectButtonC1A1;
82     QLineEdit* LineEditC1A1;
83     QCheckBox* CheckBox1;
84
85     QGroupBox* GroupButtons;
86     QPushButton* buttonOk;
87     QPushButton* buttonApply;
88     QPushButton* buttonClose;
89
90
91 private slots:
92
93     void ConstructorsClicked(int constructorId);
94     void ClickOnOk();
95     void ClickOnApply() ;
96     void ClickOnClose();
97
98     void LineEditReturnPressed() ;
99     void SetEditCurrentArgument() ;
100     void SelectionIntoArgument() ;
101     void DeactivateActiveDialog() ;
102     void ActivateThisDialog() ;
103     void ActivateUserSelection() ;
104
105 protected:
106
107     QGridLayout* GeometryGUI_FillingHoleDlgLayout;
108     QGridLayout* GroupConstructorsLayout;
109     QGridLayout* GroupC1Layout;
110     QHBoxLayout* Layout2;
111     QGridLayout* GroupButtonsLayout;
112 };
113
114 #endif // GEOMETRYGUI_FILLINGHOLE_H