1 // SMESH SMESHGUI : GUI for SMESH component
3 // Copyright (C) 2003 CEA
5 // This library is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation; either
8 // version 2.1 of the License.
10 // This library is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // Lesser General Public License for more details.
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with this library; if not, write to the Free Software
17 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // See http://www.salome-platform.org or email : webmaster.salome@opencascade.org
23 // File : SMESHGUI_GroupDlg.h
24 // Author : Natalia KOPNOVA
28 #ifndef DIALOGBOX_GROUP_H
29 #define DIALOGBOX_GROUP_H
31 #include "LightApp_SelectionMgr.h"
32 //#include "SMESH_TypeFilter.hxx"
33 #include "SUIT_SelectionFilter.h"
37 #include <qvaluelist.h>
40 #include <SALOMEconfig.h>
41 #include CORBA_SERVER_HEADER(SMESH_Mesh)
42 #include CORBA_SERVER_HEADER(SMESH_Group)
53 class SMESHGUI_FilterDlg;
55 class SVTK_ViewWindow;
57 //=================================================================================
58 // class : SMESHGUI_GroupDlg
60 //=================================================================================
61 class SMESHGUI_GroupDlg : public QDialog
66 SMESHGUI_GroupDlg( SMESHGUI*,
68 SMESH::SMESH_Mesh_ptr theMesh = SMESH::SMESH_Mesh::_nil(),
69 bool modal = FALSE, WFlags fl = 0 );
70 SMESHGUI_GroupDlg( SMESHGUI*,
72 SMESH::SMESH_GroupBase_ptr theGroup,
73 bool modal = FALSE, WFlags fl = 0 );
84 void onTypeChanged(int id);
85 void onGrpTypeChanged(int id);
93 void onListSelectionChanged();
94 void onObjectSelectionChanged();
96 void onSelectSubMesh(bool on);
97 void onSelectGroup(bool on);
98 void onSelectGeomGroup(bool on);
99 void onSelectColorGroup(bool on);
100 void setCurrentSelection();
105 void onNameChanged(const QString& text);
106 void onNbColorsChanged(const QString& text);
107 void onFilterAccepted();
110 void initDialog(bool create);
111 void init(SMESH::SMESH_Mesh_ptr theMesh);
112 void init(SMESH::SMESH_GroupBase_ptr theGroup);
113 void closeEvent(QCloseEvent* e);
114 void enterEvent (QEvent*);
115 void hideEvent (QHideEvent*); /* ESC key */
116 void setSelectionMode(int theMode);
117 void updateButtons();
119 SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */
120 LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */
121 SMESH_Actor* myActor; /* Current mesh actor */
122 int myGrpTypeId; /* Current group type id : standalone or group on geometry */
123 int myTypeId; /* Current type id = radio button id */
124 QLineEdit* myCurrentLineEdit; /* Current LineEdit */
125 SVTK_Selector* mySelector;
127 QPushButton* myMeshGroupBtn;
128 QLineEdit* myMeshGroupLine;
130 QButtonGroup* myTypeGroup;
133 QButtonGroup* myGrpTypeGroup;
135 QWidgetStack* myWGStack;
136 QListBox* myElements;
137 QPushButton* myFilter;
139 QCheckBox* mySelectSubMesh;
140 QPushButton* mySubMeshBtn;
141 QLineEdit* mySubMeshLine;
143 QCheckBox* mySelectGroup;
144 QPushButton* myGroupBtn;
145 QLineEdit* myGroupLine;
147 QCheckBox* mySelectColorGroup;
148 QLineEdit* myColorGroupLine;
150 QCheckBox* mySelectGeomGroup;
151 QPushButton* myGeomGroupBtn;
152 QLineEdit* myGeomGroupLine;
154 SMESH::SMESH_Mesh_var myMesh;
155 SMESH::SMESH_Group_var myGroup;
156 SMESH::SMESH_GroupOnGeom_var myGroupOnGeom;
157 QValueList<int> myIdList;
158 GEOM::GEOM_Object_var myGeomGroup;
161 //Handle(SMESH_TypeFilter) myMeshFilter;
162 //Handle(SMESH_TypeFilter) mySubMeshFilter;
163 //Handle(SMESH_TypeFilter) myGroupFilter;
164 SUIT_SelectionFilter* myMeshFilter;
165 SUIT_SelectionFilter* mySubMeshFilter;
166 SUIT_SelectionFilter* myGroupFilter;
168 SMESHGUI_FilterDlg* myFilterDlg;
170 bool myCreate, myIsBusy;
172 QString myHelpFileName;
175 #endif // DIALOGBOX_GROUP_H