Salome HOME
NRI : Add QAD_Desktop.h.
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_AddFaceDlg.h
1 //  File      : SMESHGUI_AddFaceDlg.h
2 //  Created   : Wed Jun 26 21:00:41 2002
3 //  Author    : Nicolas REJNERI
4
5 //  Project   : SALOME
6 //  Module    : SMESH
7 //  Copyright : Open CASCADE 2002
8 //  $Header$
9
10
11 #ifndef DIALOGBOX_ADD_FACE_H
12 #define DIALOGBOX_ADD_FACE_H
13
14 #include "SALOME_Selection.h"
15
16 // QT Includes
17 #include <qvariant.h>
18 #include <qdialog.h>
19
20 // Open CASCADE Includes
21 #include <TColStd_MapOfInteger.hxx>
22
23 class QVBoxLayout; 
24 class QHBoxLayout; 
25 class QGridLayout; 
26 class QButtonGroup;
27 class QGroupBox;
28 class QLabel;
29 class QLineEdit;
30 class QPushButton;
31 class QRadioButton;
32 class QCheckBox;
33 class SMESHGUI;
34
35 // IDL Headers
36 #include <SALOMEconfig.h>
37 #include CORBA_SERVER_HEADER(SMESH_Mesh)
38
39 //=================================================================================
40 // class    : SMESHGUI_AddFaceDlg
41 // purpose  :
42 //=================================================================================
43 class SMESHGUI_AddFaceDlg : public QDialog
44
45     Q_OBJECT
46
47 public:
48     SMESHGUI_AddFaceDlg( QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, 
49                              int nbNode = 3, bool modal = FALSE, WFlags fl = 0 );
50     ~SMESHGUI_AddFaceDlg();
51
52 private:
53
54     void Init( SALOME_Selection* Sel ) ;
55     void closeEvent( QCloseEvent* e ) ;
56     void enterEvent ( QEvent * ) ;                          /* mouse enter the QWidget */
57
58     SMESHGUI*                     mySMESHGUI ;              /* Current SMESHGUI object */
59     SALOME_Selection*             mySelection ;             /* User shape selection */
60     bool                          myOkNodes ;               /* to check when arguments is defined */
61
62     int                           myNodes ;
63     bool                          reverse ;
64     int                           myConstructorId ;         /* Current constructor id = radio button id */
65     QLineEdit*                    myEditCurrentArgument;    /* Current  LineEdit */
66
67     SMESH::SMESH_Mesh_var         myMesh;
68     TColStd_MapOfInteger          myMapIndex;
69     
70     QButtonGroup* GroupConstructors;
71     QRadioButton* Constructor1;
72     QGroupBox* GroupButtons;
73     QPushButton* buttonOk;
74     QPushButton* buttonCancel;
75     QPushButton* buttonApply;
76     QGroupBox* GroupC1;
77     QLabel* TextLabelC1A1;
78     QPushButton* SelectButtonC1A1;
79     QLineEdit* LineEditC1A1;
80
81     QCheckBox* Reverse;
82
83 private slots:
84
85     void ConstructorsClicked(int constructorId);
86     void ClickOnOk();
87     void ClickOnCancel();
88     void ClickOnApply();
89     void SetEditCurrentArgument() ;
90     void SelectionIntoArgument() ;
91     void DeactivateActiveDialog() ;
92     void ActivateThisDialog() ;
93     void CheckBox( int );
94
95 protected:
96     QGridLayout* SMESHGUI_AddFaceDlgLayout;
97     QGridLayout* GroupConstructorsLayout;
98     QGridLayout* GroupButtonsLayout;
99     QGridLayout* GroupC1Layout;
100 };
101
102 #endif // DIALOGBOX_ADD_FACE_H