1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // SMESH SMESHGUI : GUI for SMESH component
23 // File : SMESHGUI_EditHypothesesDlg.h
24 // Author : Nicolas REJNERI
28 #ifndef DIALOGBOX_EDIT_HYPOTHESES_H
29 #define DIALOGBOX_EDIT_HYPOTHESES_H
31 #include "SMESH_SMESHGUI.hxx"
33 //#include "SMESH_TypeFilter.hxx"
34 #include "SUIT_SelectionFilter.h"
35 #include "LightApp_SelectionMgr.h"
41 #include <SALOMEconfig.h>
42 #include CORBA_SERVER_HEADER(GEOM_Gen)
43 #include CORBA_SERVER_HEADER(SMESH_Mesh)
56 typedef std::map<std::string, int> MapIOR;
58 //=================================================================================
59 // class : SMESHGUI_EditHypothesesDlg
61 //=================================================================================
62 class SMESHGUI_EXPORT SMESHGUI_EditHypothesesDlg : public QDialog
67 SMESHGUI_EditHypothesesDlg (SMESHGUI*,
71 ~SMESHGUI_EditHypothesesDlg();
74 virtual void closeEvent (QCloseEvent*);
75 virtual void enterEvent (QEvent*);
80 void InitHypDefinition();
81 void InitAlgoDefinition();
82 void InitHypAssignation();
83 void InitAlgoAssignation();
87 void UpdateControlState();
92 bool IsOld(QListBoxItem* hypItem);
96 LightApp_SelectionMgr* mySelectionMgr;
98 GEOM::GEOM_Object_var myGeomShape;
99 QLineEdit* myEditCurrentArgument;
101 SMESH::SMESH_Mesh_var myMesh;
102 SMESH::SMESH_subMesh_var mySubMesh;
104 //Handle(SALOME_TypeFilter) myGeomFilter;
105 //Handle(SMESH_TypeFilter) myMeshOrSubMeshFilter;
106 SUIT_SelectionFilter* myGeomFilter;
107 SUIT_SelectionFilter* myMeshOrSubMeshFilter;
109 MapIOR myMapOldHypos, myMapOldAlgos;
110 int myNbModification;
114 QGroupBox* GroupButtons;
115 QPushButton* buttonOk;
116 QPushButton* buttonApply;
117 QPushButton* buttonCancel;
120 QLabel* TextLabelC1A1;
121 QPushButton* SelectButtonC1A1;
122 QLineEdit* LineEditC1A1;
123 QLabel* TextLabelC1A2;
124 QPushButton* SelectButtonC1A2;
125 QLineEdit* LineEditC1A2;
127 QGroupBox* GroupHypotheses;
128 QLabel* TextHypDefinition;
129 QListBox* ListHypDefinition;
130 QLabel* TextHypAssignation;
131 QListBox* ListHypAssignation;
133 QGroupBox* GroupAlgorithms;
134 QLabel* TextAlgoDefinition;
135 QListBox* ListAlgoDefinition;
136 QLabel* TextAlgoAssignation;
137 QListBox* ListAlgoAssignation;
142 void ClickOnCancel();
143 void SetEditCurrentArgument();
144 void SelectionIntoArgument();
145 void DeactivateActiveDialog();
146 void ActivateThisDialog();
148 void removeItem(QListBoxItem*);
149 void addItem(QListBoxItem*);
152 #endif // DIALOGBOX_EDIT_HYPOTHESES_H