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)
50 class SMESHGUI_FilterDlg;
52 //=================================================================================
53 // class : SMESHGUI_GroupDlg
55 //=================================================================================
56 class SMESHGUI_GroupDlg : public QDialog
61 SMESHGUI_GroupDlg( QWidget* parent = 0, const char* name = 0, SALOME_Selection* theSel = 0,
62 SMESH::SMESH_Mesh_ptr theMesh = SMESH::SMESH_Mesh::_nil(),
63 bool modal = FALSE, WFlags fl = 0 );
64 SMESHGUI_GroupDlg( QWidget* parent, const char* name, SALOME_Selection* theSel,
65 SMESH::SMESH_Group_ptr theGroup, bool modal = FALSE, WFlags fl = 0 );
76 void onTypeChanged(int id);
82 void onListSelectionChanged();
83 void onObjectSelectionChanged();
85 void onSelectSubMesh(bool on);
86 void onSelectGroup(bool on);
87 void setCurrentSelection();
92 void onNameChanged(const QString& text);
95 void initDialog(SALOME_Selection* theSel, bool create);
96 void init(SMESH::SMESH_Mesh_ptr theMesh);
97 void init(SMESH::SMESH_Group_ptr theGroup);
98 void closeEvent(QCloseEvent* e);
99 void setSelectionMode(int theMode);
100 void updateButtons();
102 SMESHGUI* mySMESHGUI ; /* Current SMESHGUI object */
103 SALOME_Selection* mySelection ; /* User shape selection */
104 SMESH_Actor* myActor; /* Current mesh actor */
105 int myTypeId ; /* Current type id = radio button id */
106 QLineEdit* myCurrentLineEdit; /* Current LineEdit */
108 QButtonGroup* myTypeGroup;
110 QListBox* myElements;
111 QPushButton* myFilter;
113 QCheckBox* mySelectSubMesh;
114 QPushButton* mySubMeshBtn;
115 QLineEdit* mySubMeshLine;
117 QCheckBox* mySelectGroup;
118 QPushButton* myGroupBtn;
119 QLineEdit* myGroupLine;
121 SMESH::SMESH_Mesh_var myMesh;
122 SMESH::SMESH_Group_var myGroup;
123 QValueList<int> myIdList;
126 Handle(SMESH_TypeFilter) mySubMeshFilter;
127 Handle(SMESH_TypeFilter) myGroupFilter;
129 SMESHGUI_FilterDlg* myFilterDlg;
132 #endif // DIALOGBOX_GROUP_H