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 "SALOME_Selection.h"
32 #include "SMESH_TypeFilter.hxx"
36 #include <qvaluelist.h>
39 #include <SALOMEconfig.h>
40 #include CORBA_SERVER_HEADER(SMESH_Mesh)
41 #include CORBA_SERVER_HEADER(SMESH_Group)
52 class SMESHGUI_FilterDlg;
54 //=================================================================================
55 // class : SMESHGUI_GroupDlg
57 //=================================================================================
58 class SMESHGUI_GroupDlg : public QDialog
63 SMESHGUI_GroupDlg( QWidget* parent = 0, const char* name = 0, SALOME_Selection* theSel = 0,
64 SMESH::SMESH_Mesh_ptr theMesh = SMESH::SMESH_Mesh::_nil(),
65 bool modal = FALSE, WFlags fl = 0 );
66 SMESHGUI_GroupDlg( QWidget* parent, const char* name, SALOME_Selection* theSel,
67 SMESH::SMESH_Group_ptr theGroup, bool modal = FALSE, WFlags fl = 0 );
78 void onTypeChanged(int id);
79 void onGrpTypeChanged(int id);
86 void onListSelectionChanged();
87 void onObjectSelectionChanged();
89 void onSelectSubMesh(bool on);
90 void onSelectGroup(bool on);
91 void onSelectGeomGroup(bool on);
92 void setCurrentSelection();
97 void onNameChanged(const QString& text);
98 void onFilterAccepted();
101 void initDialog(SALOME_Selection* theSel, bool create);
102 void init(SMESH::SMESH_Mesh_ptr theMesh);
103 void init(SMESH::SMESH_Group_ptr theGroup);
104 void closeEvent(QCloseEvent* e);
105 void enterEvent ( QEvent * ) ;
106 void hideEvent ( QHideEvent * ); /* ESC key */
107 void setSelectionMode(int theMode);
108 void updateButtons();
110 SMESHGUI* mySMESHGUI ; /* Current SMESHGUI object */
111 SALOME_Selection* mySelection ; /* User shape selection */
112 SMESH_Actor* myActor; /* Current mesh actor */
113 int myGrpTypeId ; /* Current group type id : standalone or group on geometry */
114 int myTypeId ; /* Current type id = radio button id */
115 QLineEdit* myCurrentLineEdit; /* Current LineEdit */
117 QPushButton* myMeshGroupBtn;
118 QLineEdit* myMeshGroupLine;
120 QButtonGroup* myTypeGroup;
123 QButtonGroup* myGrpTypeGroup;
125 QWidgetStack* myWGStack;
126 QListBox* myElements;
127 QPushButton* myFilter;
129 QCheckBox* mySelectSubMesh;
130 QPushButton* mySubMeshBtn;
131 QLineEdit* mySubMeshLine;
133 QCheckBox* mySelectGroup;
134 QPushButton* myGroupBtn;
135 QLineEdit* myGroupLine;
137 QCheckBox* mySelectGeomGroup;
138 QPushButton* myGeomGroupBtn;
139 QLineEdit* myGeomGroupLine;
141 SMESH::SMESH_Mesh_var myMesh;
142 SMESH::SMESH_Group_var myGroup;
143 QValueList<int> myIdList;
144 GEOM::GEOM_Object_var myGeomGroup;
147 Handle(SMESH_TypeFilter) myMeshFilter;
148 Handle(SMESH_TypeFilter) mySubMeshFilter;
149 Handle(SMESH_TypeFilter) myGroupFilter;
151 SMESHGUI_FilterDlg* myFilterDlg;
156 #endif // DIALOGBOX_GROUP_H