Salome HOME
NRI : First integration.
[modules/geom.git] / src / GEOMGUI / GeometryGUI_PartitionDlg.h
1 //  File      : GeometryGUI_PartitionDlg.h
2 //  Created   :
3 //  Author    : Lucien PIGNOLONI
4 //  Project   : SALOME
5 //  Module    : GeometryGUI
6 //  Copyright : OPEN CASCADE
7 //  $Header$
8
9 #ifndef DIALOGBOX_PARTITION_H
10 #define DIALOGBOX_PARTITION_H
11
12 #include "SALOME_Selection.h"
13 #include "GEOM_ShapeTypeFilter.hxx"
14
15 #include <qdialog.h>
16
17 class QButtonGroup;
18 class QGroupBox;
19 class QLabel;
20 class QLineEdit;
21 class QPushButton;
22 class QRadioButton;
23 class QComboBox;
24 class GeometryGUI;
25
26
27 //=================================================================================
28 // class    : GeometryGUI_PartitionDlg
29 // purpose  :
30 //=================================================================================
31 class GeometryGUI_PartitionDlg : public QDialog
32
33     Q_OBJECT
34
35 public:
36     GeometryGUI_PartitionDlg( QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0 );
37     ~GeometryGUI_PartitionDlg();
38
39 private:
40
41     void Init( SALOME_Selection* Sel ) ;
42     void closeEvent( QCloseEvent* e ) ;
43     void enterEvent ( QEvent * ) ;             /* Mouse enter the QWidget */
44
45     GEOM::GEOM_Gen_var myGeom ;                /* Current Geom object */
46     GeometryGUI*       myGeomGUI ;             /* Current GeomGUI object */
47     SALOME_Selection*  mySelection ;           /* User shape selection */
48
49     GEOM::GEOM_Gen::ListOfIOR  myListShapes ;
50     GEOM::GEOM_Gen::ListOfIOR  myListTools ;
51     GEOM::GEOM_Gen::ListOfIOR  myListRemoveInside ;
52     GEOM::GEOM_Gen::ListOfIOR  myListKeepInside ;
53
54     bool                       myOkListShapes ;        /* to check when argument is defined */
55     bool                       myOkListTools ;         /* to check when argument is defined */
56     bool                       myOkKeepShape ;         /* to check when argument is defined */
57     bool                       myOkRemoveShape ;       /* to check when argument is defined */
58     int                        myLimit;
59     QLineEdit*                 myEditCurrentArgument;  /* Current LineEdit */    
60
61     /* common buttons */
62     QGroupBox*     GroupButtons;
63     QPushButton*   buttonOk;
64     QPushButton*   buttonCancel;
65     QPushButton*   buttonApply;
66
67     /* constructor radiobuttons */
68     QButtonGroup*  GroupConstructors;
69     QRadioButton*  Constructor1;
70
71     /* Arguments group */
72     QGroupBox*     GroupC1;
73     QLineEdit*     LineEditC1A1;
74     QLabel*        TextLabelC1A1;
75     QPushButton*   SelectButtonC1A1;
76     QLineEdit*     LineEditC1A2;
77     QLabel*        TextLabelC1A2;
78     QPushButton*   SelectButtonC1A2;
79
80     /* limit */
81     QComboBox*     ComboBox1;
82     QLabel*        TextLabelComboBox1;
83
84     /* Keep Inside and Remove Inside feilds */
85     QGroupBox*     GroupC2;
86     QLineEdit*     LineEditC2A1;
87     QLabel*        TextLabelC2A1;
88     QPushButton*   SelectButtonC2A1;
89     QLineEdit*     LineEditC2A2;
90     QLabel*        TextLabelC2A2;
91     QPushButton*   SelectButtonC2A2;
92
93 private slots:
94
95     //void ConstructorsClicked(int constructorId);
96     void ClickOnOk();
97     void ClickOnCancel();
98     void ClickOnApply();
99     void SetEditCurrentArgument() ;
100     void LineEditReturnPressed() ;
101     void SelectionIntoArgument() ;
102     void DeactivateActiveDialog() ;
103     void ActivateThisDialog() ;
104     void ComboTextChanged() ;
105 };
106
107 #endif // DIALOGBOX_PARTITION_H