Salome HOME
NRI : First integration.
[modules/geom.git] / src / GEOMGUI / GeometryGUI_CompoundDlg.h
1 //  File      : GeometryGUI_CompoundDlg.h
2 //  Created   :
3 //  Author    : Lucien PIGNOLONI
4 //  Project   : SALOME
5 //  Module    : GeometryGUI
6 //  Copyright : OPEN CASCADE
7 //  $Header$
8
9 #ifndef DIALOGBOX_COMPOUND_H
10 #define DIALOGBOX_COMPOUND_H
11
12 #include "SALOME_Selection.h"
13 #include "GEOM_ShapeTypeFilter.hxx"
14
15 #include <qvariant.h>
16 #include <qdialog.h>
17
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_CompoundDlg
32 // purpose  :
33 //=================================================================================
34 class GeometryGUI_CompoundDlg : public QDialog
35
36     Q_OBJECT
37
38 public:
39     GeometryGUI_CompoundDlg( QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0 );
40     ~GeometryGUI_CompoundDlg();
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     GEOM::GEOM_Gen::ListOfIOR  myListShapes ;
52     bool                          myOkListShapes ;          /* to check when arguments is defined */
53     int                           myConstructorId ;         /* Current constructor id = radio button id */
54     QLineEdit*                    myEditCurrentArgument;    /* Current LineEdit */
55
56     QButtonGroup* GroupConstructors;
57     QRadioButton* Constructor1;
58     QGroupBox* GroupButtons;
59     QPushButton* buttonOk;
60     QPushButton* buttonCancel;
61     QPushButton* buttonApply;
62     QGroupBox* GroupC1;
63     QLabel* TextLabelC1A1;
64     QPushButton* SelectButtonC1A1;
65     QLineEdit* LineEditC1A1;
66
67 private slots:
68
69     void ConstructorsClicked(int constructorId);
70     void ClickOnOk();
71     void ClickOnCancel();
72     void ClickOnApply();
73     void SetEditCurrentArgument() ;
74     void LineEditReturnPressed() ;
75     void SelectionIntoArgument() ;
76     void DeactivateActiveDialog() ;
77     void ActivateThisDialog() ;
78
79 protected:
80     QGridLayout* GeometryGUI_CompoundDlgLayout;
81     QGridLayout* GroupConstructorsLayout;
82     QGridLayout* GroupButtonsLayout;
83     QGridLayout* GroupC1Layout;
84 };
85
86 #endif // DIALOGBOX_COMPOUND_H