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)
53 class SMESHGUI_SpinBox;
56 class LightApp_SelectionMgr;
57 class SUIT_SelectionFilter;
58 class TColStd_MapOfInteger;
65 //=================================================================================
66 // class : SMESHGUI_EditMeshDlg
68 //=================================================================================
69 class SMESHGUI_EXPORT SMESHGUI_EditMeshDlg : public QDialog
74 SMESHGUI_EditMeshDlg( SMESHGUI*, int );
75 ~SMESHGUI_EditMeshDlg();
79 void closeEvent( QCloseEvent* );
80 void enterEvent( QEvent* ); /* mouse enter the QWidget */
81 void hideEvent( QHideEvent* ); /* ESC key */
82 void keyPressEvent( QKeyEvent* );
85 void FindGravityCenter( TColStd_MapOfInteger&,
87 // add the centers of gravity of ElemsIdMap elements to the GrCentersXYZ list
90 SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */
91 LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */
92 SVTK_Selector* mySelector;
94 QWidget* myEditCurrentArgument;
96 SMESH::SMESH_Mesh_var myMesh;
97 SMESH::SMESH_IDSource_var mySubMeshOrGroup;
99 SUIT_SelectionFilter* myMeshOrSubMeshOrGroupFilter;
101 SMESH::TIdPreview* myIdPreview;
107 QGroupBox* GroupConstructors;
108 QRadioButton* RadioButton;
110 QGroupBox* GroupButtons;
111 QPushButton* buttonOk;
112 QPushButton* buttonCancel;
113 QPushButton* buttonApply;
114 QPushButton* buttonHelp;
116 QGroupBox* GroupMesh;
117 QLabel* TextLabelName;
118 QPushButton* SelectMeshButton;
119 QLineEdit* LineEditMesh;
121 QGroupBox* GroupCoincident;
122 QLabel* TextLabelTolerance;
123 SMESHGUI_SpinBox* SpinBoxTolerance;
124 QPushButton* DetectButton;
125 QListWidget* ListCoincident;
126 QPushButton* AddGroupButton;
127 QPushButton* RemoveGroupButton;
128 QCheckBox* SelectAllCB;
130 QGroupBox* GroupEdit;
131 QListWidget* ListEdit;
132 QPushButton* AddElemButton;
133 QPushButton* RemoveElemButton;
134 QPushButton* SetFirstButton;
136 QString myHelpFileName;
140 void ClickOnCancel();
143 void updateControls();
146 void onRemoveGroup();
147 void onSelectGroup();
148 void onSelectAll( bool );
149 void onSelectElementFromGroup();
151 void onRemoveElement();
153 void SetEditCurrentArgument();
154 void SelectionIntoArgument();
155 void DeactivateActiveDialog();
156 void ActivateThisDialog();
159 #endif // SMESHGUI_EDITMESHDLG_H