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 "SMESH_SMESHGUI.hxx"
33 #include "LightApp_SelectionMgr.h"
34 //#include "SMESH_TypeFilter.hxx"
35 #include "SUIT_SelectionFilter.h"
39 #include <qvaluelist.h>
42 #include <SALOMEconfig.h>
43 #include CORBA_SERVER_HEADER(SMESH_Mesh)
44 #include CORBA_SERVER_HEADER(SMESH_Group)
55 class SMESHGUI_FilterDlg;
57 class SVTK_ViewWindow;
59 //=================================================================================
60 // class : SMESHGUI_GroupDlg
62 //=================================================================================
63 class SMESHGUI_EXPORT SMESHGUI_GroupDlg : public QDialog
68 SMESHGUI_GroupDlg( SMESHGUI*,
70 SMESH::SMESH_Mesh_ptr theMesh = SMESH::SMESH_Mesh::_nil(),
71 bool modal = FALSE, WFlags fl = 0 );
72 SMESHGUI_GroupDlg( SMESHGUI*,
74 SMESH::SMESH_Group_ptr theGroup,
75 bool modal = FALSE, WFlags fl = 0 );
86 void onTypeChanged(int id);
87 void onGrpTypeChanged(int id);
94 void onListSelectionChanged();
95 void onObjectSelectionChanged();
97 void onSelectSubMesh(bool on);
98 void onSelectGroup(bool on);
99 void onSelectGeomGroup(bool on);
100 void setCurrentSelection();
105 void onNameChanged(const QString& text);
106 void onFilterAccepted();
109 void initDialog(bool create);
110 void init(SMESH::SMESH_Mesh_ptr theMesh);
111 void init(SMESH::SMESH_Group_ptr theGroup);
112 void closeEvent(QCloseEvent* e);
113 void enterEvent (QEvent*);
114 void hideEvent (QHideEvent*); /* ESC key */
115 void setSelectionMode(int theMode);
116 void updateButtons();
118 SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */
119 LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */
120 SMESH_Actor* myActor; /* Current mesh actor */
121 int myGrpTypeId; /* Current group type id : standalone or group on geometry */
122 int myTypeId; /* Current type id = radio button id */
123 QLineEdit* myCurrentLineEdit; /* Current LineEdit */
124 SVTK_Selector* mySelector;
126 QPushButton* myMeshGroupBtn;
127 QLineEdit* myMeshGroupLine;
129 QButtonGroup* myTypeGroup;
132 QButtonGroup* myGrpTypeGroup;
134 QWidgetStack* myWGStack;
135 QListBox* myElements;
136 QPushButton* myFilter;
138 QCheckBox* mySelectSubMesh;
139 QPushButton* mySubMeshBtn;
140 QLineEdit* mySubMeshLine;
142 QCheckBox* mySelectGroup;
143 QPushButton* myGroupBtn;
144 QLineEdit* myGroupLine;
146 QCheckBox* mySelectGeomGroup;
147 QPushButton* myGeomGroupBtn;
148 QLineEdit* myGeomGroupLine;
150 SMESH::SMESH_Mesh_var myMesh;
151 SMESH::SMESH_Group_var myGroup;
152 QValueList<int> myIdList;
153 GEOM::GEOM_Object_var myGeomGroup;
156 //Handle(SMESH_TypeFilter) myMeshFilter;
157 //Handle(SMESH_TypeFilter) mySubMeshFilter;
158 //Handle(SMESH_TypeFilter) myGroupFilter;
159 SUIT_SelectionFilter* myMeshFilter;
160 SUIT_SelectionFilter* mySubMeshFilter;
161 SUIT_SelectionFilter* myGroupFilter;
163 SMESHGUI_FilterDlg* myFilterDlg;
165 bool myCreate, myIsBusy;
168 #endif // DIALOGBOX_GROUP_H