Salome HOME
NRI : Change lGeometryClient by lGEOMClient.
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_AddHypothesisDlg.h
1 //  File      : SMESHGUI_AddHypothesisDlg.h
2 //  Created   : Wed May 22 19:05:13 2002
3 //  Author    : Nicolas REJNERI
4
5 //  Project   : SALOME
6 //  Module    : SMESHGUI
7 //  Copyright : Open CASCADE 2002
8 //  $Header$
9
10
11 #ifndef DIALOGBOX_ADD_HYPOTHESIS_H
12 #define DIALOGBOX_ADD_HYPOTHESIS_H
13
14 #include "SALOME_Selection.h"
15 #include "SALOME_TypeFilter.hxx"
16 #include "SMESH_TypeFilter.hxx"
17 #include "SALOME_ListIO.hxx"
18
19 // IDL Headers
20 #include <SALOMEconfig.h>
21 #include CORBA_SERVER_HEADER(SMESH_Gen)
22
23 // QT Includes
24 #include <qvariant.h>
25 #include <qdialog.h>
26
27 class QVBoxLayout; 
28 class QHBoxLayout; 
29 class QGridLayout; 
30 class QButtonGroup;
31 class QFrame;
32 class QGroupBox;
33 class QLabel;
34 class QLineEdit;
35 class QPushButton;
36 class QRadioButton;
37 class SMESHGUI;
38
39
40 //=================================================================================
41 // class    : SMESHGUI_AddHypothesisDlg
42 // purpose  :
43 //=================================================================================
44 class SMESHGUI_AddHypothesisDlg : public QDialog
45
46     Q_OBJECT
47
48 public:
49     SMESHGUI_AddHypothesisDlg( QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0 );
50     ~SMESHGUI_AddHypothesisDlg();
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     SMESH::SMESH_Gen_var  myCompMesh ;                
59     SMESHGUI*             mySMESHGUI ;            
60     SALOME_Selection*     mySelection ;          
61
62     SMESH::SMESH_Mesh_var       myMesh;
63     SMESH::SMESH_subMesh_var    mySubMesh;
64
65     SMESH::SMESH_Hypothesis_var myHypothesis;
66
67     Handle(SMESH_TypeFilter)  myHypothesisFilter;
68     Handle(SMESH_TypeFilter)  myMeshOrSubMeshFilter;
69
70     bool                      myOkMesh ;
71     bool                      myOkSubMesh ;
72     bool                      myOkHypothesis;
73
74     int                   myConstructorId ;       /* Current constructor id = radio button id */
75     QLineEdit*            myEditCurrentArgument;  /* Current LineEdit */    
76
77     SALOME_ListIO HypoList;
78
79     QButtonGroup* GroupConstructors;
80     QRadioButton* Constructor1;
81
82     QGroupBox* GroupConstructor1;
83     QLineEdit* LineEditC1A1Hyp;
84     QLineEdit* LineEditC1A2Mesh;
85     QPushButton* SelectButtonC1A1Hyp;
86     QPushButton* SelectButtonC1A2Mesh;
87     QLabel* TextLabelC1A2Mesh;
88     QLabel* TextLabelC1A1Hyp;
89
90     QGroupBox* GroupButtons;
91     QPushButton* buttonApply;
92     QPushButton* buttonOk;
93     QPushButton* buttonCancel;
94
95 private slots:
96
97     void ConstructorsClicked(int constructorId);
98     void ClickOnOk();
99     void ClickOnCancel();
100     void ClickOnApply();
101     void SetEditCurrentArgument() ;
102     void SelectionIntoArgument() ;
103     void LineEditReturnPressed() ;
104     void DeactivateActiveDialog() ;
105     void ActivateThisDialog() ;
106
107 protected:
108     QGridLayout* SMESHGUI_AddHypothesisDlgLayout;
109     QGridLayout* GroupConstructorsLayout;
110     QGridLayout* GroupButtonsLayout;
111     QGridLayout* GroupConstructor1Layout;
112 };
113
114 #endif // DIALOGBOX_ADD_HYPOTHESIS_H