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
23 #ifndef SMESHGUI_EditMeshDlg_H
24 #define SMESHGUI_EditMeshDlg_H
26 #include "SMESH_SMESHGUI.hxx"
28 #include "LightApp_SelectionMgr.h"
29 #include "SUIT_SelectionFilter.h"
34 // Open CASCADE Includes
47 class SMESHGUI_SpinBox;
50 class SVTK_ViewWindow;
58 #include <SALOMEconfig.h>
59 #include CORBA_SERVER_HEADER(SMESH_MeshEditor)
61 //=================================================================================
62 // class : SMESHGUI_EditMeshDlg
64 //=================================================================================
65 class SMESHGUI_EXPORT SMESHGUI_EditMeshDlg : public QDialog
70 SMESHGUI_EditMeshDlg (SMESHGUI * theModule,
72 ~SMESHGUI_EditMeshDlg();
76 void closeEvent (QCloseEvent*);
77 void enterEvent (QEvent*); /* mouse enter the QWidget */
78 void hideEvent (QHideEvent*); /* ESC key */
79 void keyPressEvent(QKeyEvent*);
82 void FindGravityCenter(TColStd_MapOfInteger & ElemsIdMap,
83 list< gp_XYZ > & GrCentersXYZ);
84 // add the centers of gravity of ElemsIdMap elements to the GrCentersXYZ list
87 SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */
88 LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */
89 SVTK_Selector* mySelector;
91 QWidget* myEditCurrentArgument;
93 SMESH::SMESH_Mesh_var myMesh;
94 SMESH::SMESH_IDSource_var mySubMeshOrGroup;
96 SUIT_SelectionFilter* myMeshOrSubMeshOrGroupFilter;
98 SMESH::TIdPreview* myIdPreview;
104 QButtonGroup* GroupConstructors;
105 QRadioButton* RadioButton;
107 QGroupBox* GroupButtons;
108 QPushButton* buttonOk;
109 QPushButton* buttonCancel;
110 QPushButton* buttonApply;
111 QPushButton* buttonHelp;
113 QGroupBox* GroupMesh;
114 QLabel* TextLabelName;
115 QPushButton* SelectMeshButton;
116 QLineEdit* LineEditMesh;
118 QGroupBox* GroupCoincident;
119 QLabel* TextLabelTolerance;
120 SMESHGUI_SpinBox* SpinBoxTolerance;
121 QPushButton* DetectButton;
122 QListBox* ListCoincident;
123 QPushButton* AddGroupButton;
124 QPushButton* RemoveGroupButton;
125 QCheckBox* SelectAllCB;
127 QGroupBox* GroupEdit;
129 QPushButton* AddElemButton;
130 QPushButton* RemoveElemButton;
131 QPushButton* SetFirstButton;
134 QGridLayout* DlgLayout;
135 QGridLayout* GroupConstructorsLayout;
136 QGridLayout* GroupButtonsLayout;
137 QGridLayout* GroupMeshLayout;
138 QGridLayout* GroupCoincidentLayout;
139 QGridLayout* GroupEditLayout;
141 QString myHelpFileName;
145 void ClickOnCancel();
148 void updateControls();
151 void onRemoveGroup();
152 void onSelectGroup();
153 void onSelectAll(bool isToggled);
154 void onSelectElementFromGroup();
156 void onRemoveElement();
158 void SetEditCurrentArgument();
159 void SelectionIntoArgument() ;
160 void DeactivateActiveDialog() ;
161 void ActivateThisDialog() ;
165 #endif // SMESHGUI_EditMeshDlg_H