1 // Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 #ifndef SMESHGUI_EditMeshDlg_H
22 #define SMESHGUI_EditMeshDlg_H
24 #include "LightApp_SelectionMgr.h"
25 #include "SUIT_SelectionFilter.h"
30 // Open CASCADE Includes
43 class SMESHGUI_SpinBox;
46 class SVTK_ViewWindow;
54 #include <SALOMEconfig.h>
55 #include CORBA_SERVER_HEADER(SMESH_MeshEditor)
57 //=================================================================================
58 // class : SMESHGUI_EditMeshDlg
60 //=================================================================================
61 class SMESHGUI_EditMeshDlg : public QDialog
66 SMESHGUI_EditMeshDlg (SMESHGUI * theModule,
68 ~SMESHGUI_EditMeshDlg();
72 void closeEvent (QCloseEvent*);
73 void enterEvent (QEvent*); /* mouse enter the QWidget */
74 void hideEvent (QHideEvent*); /* ESC key */
75 void keyPressEvent(QKeyEvent*);
78 void FindGravityCenter(TColStd_MapOfInteger & ElemsIdMap,
79 list< gp_XYZ > & GrCentersXYZ);
80 // add the centers of gravity of ElemsIdMap elements to the GrCentersXYZ list
83 SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */
84 LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */
85 SVTK_Selector* mySelector;
87 QWidget* myEditCurrentArgument;
89 SMESH::SMESH_Mesh_var myMesh;
90 SMESH::SMESH_IDSource_var mySubMeshOrGroup;
92 SUIT_SelectionFilter* myMeshOrSubMeshOrGroupFilter;
94 SMESH::TIdPreview* myIdPreview;
100 QButtonGroup* GroupConstructors;
101 QRadioButton* RadioButton;
103 QGroupBox* GroupButtons;
104 QPushButton* buttonOk;
105 QPushButton* buttonCancel;
106 QPushButton* buttonApply;
107 QPushButton* buttonHelp;
109 QGroupBox* GroupMesh;
110 QLabel* TextLabelName;
111 QPushButton* SelectMeshButton;
112 QLineEdit* LineEditMesh;
114 QGroupBox* GroupCoincident;
115 QLabel* TextLabelTolerance;
116 SMESHGUI_SpinBox* SpinBoxTolerance;
117 QPushButton* DetectButton;
118 QListBox* ListCoincident;
119 QPushButton* AddGroupButton;
120 QPushButton* RemoveGroupButton;
121 QCheckBox* SelectAllCB;
123 QGroupBox* GroupEdit;
125 QPushButton* AddElemButton;
126 QPushButton* RemoveElemButton;
127 QPushButton* SetFirstButton;
130 QGridLayout* DlgLayout;
131 QGridLayout* GroupConstructorsLayout;
132 QGridLayout* GroupButtonsLayout;
133 QGridLayout* GroupMeshLayout;
134 QGridLayout* GroupCoincidentLayout;
135 QGridLayout* GroupEditLayout;
137 QString myHelpFileName;
141 void ClickOnCancel();
144 void updateControls();
147 void onRemoveGroup();
148 void onSelectGroup();
149 void onSelectAll(bool isToggled);
150 void onSelectElementFromGroup();
152 void onRemoveElement();
154 void SetEditCurrentArgument();
155 void SelectionIntoArgument() ;
156 void DeactivateActiveDialog() ;
157 void ActivateThisDialog() ;
161 #endif // SMESHGUI_EditMeshDlg_H