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_Group_ptr theGroup,
73 bool modal = FALSE, WFlags fl = 0 );
84 void onTypeChanged(int id);
85 void onGrpTypeChanged(int id);
92 void onListSelectionChanged();
93 void onObjectSelectionChanged();
95 void onSelectSubMesh(bool on);
96 void onSelectGroup(bool on);
97 void onSelectGeomGroup(bool on);
98 void setCurrentSelection();
103 void onNameChanged(const QString& text);
104 void onFilterAccepted();
107 void initDialog(bool create);
108 void init(SMESH::SMESH_Mesh_ptr theMesh);
109 void init(SMESH::SMESH_Group_ptr theGroup);
110 void closeEvent(QCloseEvent* e);
111 void enterEvent (QEvent*);
112 void hideEvent (QHideEvent*); /* ESC key */
113 void setSelectionMode(int theMode);
114 void updateButtons();
116 SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */
117 LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */
118 SMESH_Actor* myActor; /* Current mesh actor */
119 int myGrpTypeId; /* Current group type id : standalone or group on geometry */
120 int myTypeId; /* Current type id = radio button id */
121 QLineEdit* myCurrentLineEdit; /* Current LineEdit */
122 SVTK_Selector* mySelector;
124 QPushButton* myMeshGroupBtn;
125 QLineEdit* myMeshGroupLine;
127 QButtonGroup* myTypeGroup;
130 QButtonGroup* myGrpTypeGroup;
132 QWidgetStack* myWGStack;
133 QListBox* myElements;
134 QPushButton* myFilter;
136 QCheckBox* mySelectSubMesh;
137 QPushButton* mySubMeshBtn;
138 QLineEdit* mySubMeshLine;
140 QCheckBox* mySelectGroup;
141 QPushButton* myGroupBtn;
142 QLineEdit* myGroupLine;
144 QCheckBox* mySelectGeomGroup;
145 QPushButton* myGeomGroupBtn;
146 QLineEdit* myGeomGroupLine;
148 SMESH::SMESH_Mesh_var myMesh;
149 SMESH::SMESH_Group_var myGroup;
150 QValueList<int> myIdList;
151 GEOM::GEOM_Object_var myGeomGroup;
154 //Handle(SMESH_TypeFilter) myMeshFilter;
155 //Handle(SMESH_TypeFilter) mySubMeshFilter;
156 //Handle(SMESH_TypeFilter) myGroupFilter;
157 SUIT_SelectionFilter* myMeshFilter;
158 SUIT_SelectionFilter* mySubMeshFilter;
159 SUIT_SelectionFilter* myGroupFilter;
161 SMESHGUI_FilterDlg* myFilterDlg;
163 bool myCreate, myIsBusy;
166 #endif // DIALOGBOX_GROUP_H