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