1 // Copyright (C) 2007-2010 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
23 // SMESH SMESHGUI : GUI for SMESH component
24 // File : SMESHGUI_EditMeshDlg.h
25 // Author : Open CASCADE S.A.S.
27 #ifndef SMESHGUI_EDITMESHDLG_H
28 #define SMESHGUI_EDITMESHDLG_H
31 #include "SMESH_SMESHGUI.hxx"
43 #include <SALOMEconfig.h>
44 #include CORBA_SERVER_HEADER(SMESH_Mesh)
55 class SMESHGUI_SpinBox;
58 class LightApp_SelectionMgr;
59 class SUIT_SelectionFilter;
60 class TColStd_MapOfInteger;
67 //=================================================================================
68 // class : SMESHGUI_EditMeshDlg
70 //=================================================================================
71 class SMESHGUI_EXPORT SMESHGUI_EditMeshDlg : public QDialog
76 SMESHGUI_EditMeshDlg( SMESHGUI*, int );
77 ~SMESHGUI_EditMeshDlg();
81 void closeEvent( QCloseEvent* );
82 void enterEvent( QEvent* ); /* mouse enter the QWidget */
83 void hideEvent( QHideEvent* ); /* ESC key */
84 void keyPressEvent( QKeyEvent* );
87 void FindGravityCenter( TColStd_MapOfInteger&,
89 // add the centers of gravity of ElemsIdMap elements to the GrCentersXYZ list
92 SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */
93 LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */
94 SVTK_Selector* mySelector;
96 QWidget* myEditCurrentArgument;
98 SMESH::SMESH_Mesh_var myMesh;
99 SMESH::SMESH_IDSource_var mySubMeshOrGroup;
100 SMESH_Actor* myActor;
101 SUIT_SelectionFilter* myMeshOrSubMeshOrGroupFilter;
103 SMESH::TIdPreview* myIdPreview;
110 QGroupBox* GroupConstructors;
111 QRadioButton* RadioButton;
113 QGroupBox* GroupButtons;
114 QPushButton* buttonOk;
115 QPushButton* buttonCancel;
116 QPushButton* buttonApply;
117 QPushButton* buttonHelp;
119 QGroupBox* GroupMesh;
120 QLabel* TextLabelName;
121 QPushButton* SelectMeshButton;
122 QLineEdit* LineEditMesh;
124 QGroupBox* GroupCoincident;
125 QWidget* GroupCoincidentWidget;
126 QLabel* TextLabelTolerance;
127 SMESHGUI_SpinBox* SpinBoxTolerance;
128 QPushButton* DetectButton;
129 QListWidget* ListCoincident;
130 QPushButton* AddGroupButton;
131 QPushButton* RemoveGroupButton;
132 QCheckBox* SelectAllCB;
134 QGroupBox* GroupEdit;
135 QListWidget* ListEdit;
136 QPushButton* AddElemButton;
137 QPushButton* RemoveElemButton;
138 QPushButton* SetFirstButton;
141 QButtonGroup* GroupType;
143 QString myHelpFileName;
147 void ClickOnCancel();
150 void updateControls();
153 void onRemoveGroup();
154 void onSelectGroup();
155 void onSelectAll( bool );
156 void onSelectElementFromGroup();
158 void onRemoveElement();
160 void SetEditCurrentArgument();
161 void SelectionIntoArgument();
162 void DeactivateActiveDialog();
163 void ActivateThisDialog();
164 void onTypeChanged(int);
167 #endif // SMESHGUI_EDITMESHDLG_H