1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // SMESH SMESHGUI : GUI for SMESH component
23 // File : SMESHGUI_EditMeshDlg.h
24 // Author : Open CASCADE S.A.S.
26 #ifndef SMESHGUI_EDITMESHDLG_H
27 #define SMESHGUI_EDITMESHDLG_H
30 #include "SMESH_SMESHGUI.hxx"
42 #include <SALOMEconfig.h>
43 #include CORBA_SERVER_HEADER(SMESH_Mesh)
54 class SMESHGUI_SpinBox;
57 class LightApp_SelectionMgr;
58 class SUIT_SelectionFilter;
59 class TColStd_MapOfInteger;
66 //=================================================================================
67 // class : SMESHGUI_EditMeshDlg
69 //=================================================================================
70 class SMESHGUI_EXPORT SMESHGUI_EditMeshDlg : public QDialog
75 SMESHGUI_EditMeshDlg( SMESHGUI*, int );
76 ~SMESHGUI_EditMeshDlg();
80 void closeEvent( QCloseEvent* );
81 void enterEvent( QEvent* ); /* mouse enter the QWidget */
82 void hideEvent( QHideEvent* ); /* ESC key */
83 void keyPressEvent( QKeyEvent* );
86 void FindGravityCenter( TColStd_MapOfInteger&,
88 // add the centers of gravity of ElemsIdMap elements to the GrCentersXYZ list
91 SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */
92 LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */
93 SVTK_Selector* mySelector;
95 QWidget* myEditCurrentArgument;
97 SMESH::SMESH_Mesh_var myMesh;
98 SMESH::SMESH_IDSource_var mySubMeshOrGroup;
100 SUIT_SelectionFilter* myMeshOrSubMeshOrGroupFilter;
102 SMESH::TIdPreview* myIdPreview;
109 QGroupBox* GroupConstructors;
110 QRadioButton* RadioButton;
112 QGroupBox* GroupButtons;
113 QPushButton* buttonOk;
114 QPushButton* buttonCancel;
115 QPushButton* buttonApply;
116 QPushButton* buttonHelp;
118 QGroupBox* GroupMesh;
119 QLabel* TextLabelName;
120 QPushButton* SelectMeshButton;
121 QLineEdit* LineEditMesh;
123 QGroupBox* GroupCoincident;
124 QWidget* GroupCoincidentWidget;
125 QLabel* TextLabelTolerance;
126 SMESHGUI_SpinBox* SpinBoxTolerance;
127 QPushButton* DetectButton;
128 QListWidget* ListCoincident;
129 QPushButton* AddGroupButton;
130 QPushButton* RemoveGroupButton;
131 QCheckBox* SelectAllCB;
133 QGroupBox* GroupEdit;
134 QListWidget* ListEdit;
135 QPushButton* AddElemButton;
136 QPushButton* RemoveElemButton;
137 QPushButton* SetFirstButton;
140 QButtonGroup* GroupType;
142 QString myHelpFileName;
146 void ClickOnCancel();
149 void updateControls();
152 void onRemoveGroup();
153 void onSelectGroup();
154 void onSelectAll( bool );
155 void onSelectElementFromGroup();
157 void onRemoveElement();
159 void SetEditCurrentArgument();
160 void SelectionIntoArgument();
161 void DeactivateActiveDialog();
162 void ActivateThisDialog();
163 void onTypeChanged(int);
166 #endif // SMESHGUI_EDITMESHDLG_H