1 // SMESH SMESHGUI : GUI for SMESH component
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : SMESHGUI_EditHypothesesDlg.h
25 // Author : Nicolas REJNERI
29 #ifndef DIALOGBOX_EDIT_HYPOTHESES_H
30 #define DIALOGBOX_EDIT_HYPOTHESES_H
32 #include "SALOME_Selection.h"
33 #include "SALOME_TypeFilter.hxx"
34 #include "SMESH_TypeFilter.hxx"
41 #include <SALOMEconfig.h>
42 #include CORBA_SERVER_HEADER(GEOM_Gen)
43 #include CORBA_SERVER_HEADER(GEOM_Shape)
44 #include CORBA_SERVER_HEADER(SMESH_Mesh)
65 //=================================================================================
66 // class : SMESHGUI_EditHypothesesDlg
68 //=================================================================================
69 class SMESHGUI_EditHypothesesDlg : public QDialog
74 SMESHGUI_EditHypothesesDlg( QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0 );
75 ~SMESHGUI_EditHypothesesDlg();
79 void Init( SALOME_Selection* Sel ) ;
80 void closeEvent( QCloseEvent* e ) ;
81 void enterEvent ( QEvent * ) ;
83 void InitHypDefinition();
84 void InitAlgoDefinition();
85 void InitHypAssignation();
86 void InitAlgoAssignation();
90 SMESHGUI* mySMESHGUI ;
91 SALOME_Selection* mySelection ;
93 GEOM::GEOM_Shape_var myGeomShape ;
95 QLineEdit* myEditCurrentArgument;
97 SMESH::SMESH_Mesh_var myMesh;
98 SMESH::SMESH_subMesh_var mySubMesh;
100 Handle(SALOME_TypeFilter) myGeomFilter;
101 Handle(SMESH_TypeFilter) myMeshOrSubMeshFilter;
103 map<string,string> mapNameIOR;
105 SALOME_ListIO HypoList;
106 SALOME_ListIO AlgoList;
111 SMESH::SMESH_Hypothesis_var myHypothesis;
112 SMESH::SMESH_Hypothesis_var myAlgorithm;
114 SMESH::ListOfHypothesis_var myLHypothesis;
115 SMESH::ListOfHypothesis_var myLAlgorithm;
117 QButtonGroup* GroupConstructors;
118 QRadioButton* Constructor1;
119 QGroupBox* GroupButtons;
120 QPushButton* buttonOk;
121 QPushButton* buttonCancel;
122 QPushButton* buttonApply;
125 QLabel* TextLabelC1A1;
126 QPushButton* SelectButtonC1A1;
127 QLineEdit* LineEditC1A1;
129 QLabel* TextLabelC1A2;
130 QPushButton* SelectButtonC1A2;
131 QLineEdit* LineEditC1A2;
133 QGroupBox* GroupHypotheses;
134 QLabel* TextHypDefinition;
135 QListBox* ListHypDefinition;
136 QLabel* TextHypAssignation;
137 QListBox* ListHypAssignation;
139 QGroupBox* GroupAlgorithms;
140 QLabel* TextAlgoDefinition;
141 QListBox* ListAlgoDefinition;
142 QLabel* TextAlgoAssignation;
143 QListBox* ListAlgoAssignation;
147 void ConstructorsClicked(int constructorId);
148 void ClickOnCancel();
149 void SetEditCurrentArgument() ;
150 void SelectionIntoArgument() ;
151 void DeactivateActiveDialog() ;
152 void ActivateThisDialog() ;
153 void TextChangedInLineEdit(const QString& newText) ;
155 void removeItem(QListBoxItem*);
156 void addItem(QListBoxItem*);
159 QGridLayout* SMESHGUI_EditHypothesesDlgLayout;
160 QGridLayout* GroupConstructorsLayout;
161 QGridLayout* GroupButtonsLayout;
162 QGridLayout* GroupC1Layout;
177 #endif // DIALOGBOX_EDIT_HYPOTHESES_H