Salome HOME
NRI : First integration.
[modules/geom.git] / src / GEOMGUI / GeometryGUI_ShellDlg.h
1 //  File      : GeometryGUI_ShellDlg.h
2 //  Created   :
3 //  Author    : Lucien PIGNOLONI
4 //  Project   : SALOME
5 //  Module    : GeometryGUI
6 //  Copyright : OPEN CASCADE
7 //  $Header$
8
9
10 #ifndef DIALOGBOX_SHELL_H
11 #define DIALOGBOX_SHELL_H
12
13 #include "SALOME_Selection.h"
14 #include "GEOM_ShapeTypeFilter.hxx"
15
16 #include <qvariant.h>
17 #include <qdialog.h>
18 class QVBoxLayout; 
19 class QHBoxLayout; 
20 class QGridLayout; 
21 class QButtonGroup;
22 class QGroupBox;
23 class QLabel;
24 class QLineEdit;
25 class QPushButton;
26 class QRadioButton;
27 class GeometryGUI;
28
29
30 //=================================================================================
31 // class    : GeometryGUI_ShellDlg
32 // purpose  :
33 //=================================================================================
34 class GeometryGUI_ShellDlg : public QDialog
35
36     Q_OBJECT
37
38 public:
39     GeometryGUI_ShellDlg( QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0 );
40     ~GeometryGUI_ShellDlg();
41
42 private:
43
44     void Init( SALOME_Selection* Sel ) ;
45     void closeEvent( QCloseEvent* e ) ;
46     void enterEvent ( QEvent * ) ;                         /* mouse enter the QWidget */
47
48     GEOM::GEOM_Gen_var         myGeom ;                 /* Current Geom object */
49     GeometryGUI*                  myGeomGUI ;              /* Current GeomGUI object */
50     SALOME_Selection*             mySelection ;            /* User shape selection */
51
52     GEOM::GEOM_Gen::ListOfIOR  myListShapes ;
53     bool                          myOkListShapes ;         /* to check when argument is defined */
54
55     int                           myConstructorId ;        /* Current constructor id = radio button id */
56     QLineEdit*                    myEditCurrentArgument;   /* Current LineEdit */
57
58     QButtonGroup* GroupConstructors;
59     QRadioButton* Constructor1;
60     QGroupBox* GroupC1;
61     QLineEdit* LineEditC1A1;
62     QPushButton* SelectButtonC1A1;
63     QLabel* TextLabelC1A1;
64     QGroupBox* GroupButtons;
65     QPushButton* buttonApply;
66     QPushButton* buttonOk;
67     QPushButton* buttonCancel;
68
69 private slots:
70
71     void ConstructorsClicked(int constructorId);
72     void ClickOnOk();
73     void ClickOnCancel();
74     void ClickOnApply();
75     void SetEditCurrentArgument() ;
76     void LineEditReturnPressed() ;
77     void SelectionIntoArgument() ;
78     void DeactivateActiveDialog() ;
79     void ActivateThisDialog() ;
80
81 protected:
82     QGridLayout* GeometryGUI_ShellDlgLayout;
83     QGridLayout* GroupConstructorsLayout;
84     QGridLayout* GroupC1Layout;
85     QHBoxLayout* GroupButtonsLayout;
86 };
87
88 #endif // DIALOGBOX_SHELL_H