Salome HOME
This commit was generated by cvs2git to create branch 'IMPORT'.
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_AddAlgorithmDlg.h
1 //  File      : SMESHGUI_AddAlgorithmDlg.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_ALGORITHM_H
12 #define DIALOGBOX_ADD_ALGORITHM_H
13
14 #include "SALOME_Selection.h"
15 #include "SMESH_TypeFilter.hxx"
16 #include "SALOME_ListIO.hxx"
17
18 // IDL Headers
19 #include <SALOMEconfig.h>
20 #include CORBA_SERVER_HEADER(SMESH_Gen)
21
22 // QT Includes
23 #include <qvariant.h>
24 #include <qdialog.h>
25
26 class QVBoxLayout; 
27 class QHBoxLayout; 
28 class QGridLayout; 
29 class QButtonGroup;
30 class QFrame;
31 class QGroupBox;
32 class QLabel;
33 class QLineEdit;
34 class QPushButton;
35 class QRadioButton;
36 class SMESHGUI;
37
38
39 //=================================================================================
40 // class    : SMESHGUI_AddAlgorithmDlg
41 // purpose  :
42 //=================================================================================
43 class SMESHGUI_AddAlgorithmDlg : public QDialog
44
45     Q_OBJECT
46
47 public:
48     SMESHGUI_AddAlgorithmDlg( QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0 );
49     ~SMESHGUI_AddAlgorithmDlg();
50
51 private:
52
53     void Init( SALOME_Selection* Sel ) ;
54     void closeEvent( QCloseEvent* e ) ;
55     void enterEvent ( QEvent * ) ;                /* mouse enter the QWidget */
56
57     SMESH::SMESH_Gen_var  myCompMesh ;                
58     SMESHGUI*             mySMESHGUI ;            
59     SALOME_Selection*     mySelection ;          
60
61     SMESH::SMESH_Mesh_var       myMesh;
62     SMESH::SMESH_subMesh_var    mySubMesh;
63     SMESH::SMESH_Hypothesis_var myAlgorithm;
64
65     Handle(SMESH_TypeFilter)  myAlgorithmFilter;
66     Handle(SMESH_TypeFilter) myMeshOrSubMeshFilter;
67
68     bool                  myOkMesh ;
69     bool                  myOkSubMesh ;
70     bool                  myOkAlgorithm;
71
72     int                   myConstructorId ;       /* Current constructor id = radio button id */
73     QLineEdit*            myEditCurrentArgument;  /* Current LineEdit */    
74
75     SALOME_ListIO AlgoList;
76
77     QButtonGroup* GroupConstructors;
78     QRadioButton* Constructor1;
79
80     QGroupBox* GroupConstructor1;
81     QLineEdit* LineEditC1A1Hyp;
82     QLineEdit* LineEditC1A2Mesh;
83     QPushButton* SelectButtonC1A1Hyp;
84     QPushButton* SelectButtonC1A2Mesh;
85     QLabel* TextLabelC1A2Mesh;
86     QLabel* TextLabelC1A1Hyp;
87
88     QGroupBox* GroupButtons;
89     QPushButton* buttonApply;
90     QPushButton* buttonOk;
91     QPushButton* buttonCancel;
92
93 private slots:
94
95     void ConstructorsClicked(int constructorId);
96     void ClickOnOk();
97     void ClickOnCancel();
98     void ClickOnApply();
99     void SetEditCurrentArgument() ;
100     void SelectionIntoArgument() ;
101     void LineEditReturnPressed() ;
102     void DeactivateActiveDialog() ;
103     void ActivateThisDialog() ;
104
105 protected:
106     QGridLayout* SMESHGUI_AddAlgorithmDlgLayout;
107     QGridLayout* GroupConstructorsLayout;
108     QGridLayout* GroupButtonsLayout;
109     QGridLayout* GroupConstructor1Layout;
110 };
111
112 #endif // DIALOGBOX_ADD_ALGORITHM_H