1 // Copyright (C) 2007-2013 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 // File : SMESHGUI_MultiEditDlg.h
24 // Author : Sergey LITONIN, Open CASCADE S.A.S.
26 #ifndef SMESHGUI_MULTIEDITDLG_H
27 #define SMESHGUI_MULTIEDITDLG_H
30 #include "SMESH_SMESHGUI.hxx"
31 #include "SMESHGUI_PreviewDlg.h"
37 #include <TColStd_MapOfInteger.hxx>
40 #include <SALOMEconfig.h>
41 #include CORBA_SERVER_HEADER(SMESH_Mesh)
42 #include CORBA_SERVER_HEADER(SMESH_MeshEditor)
45 class SMESHGUI_FilterDlg;
46 class SMESHGUI_SpinBox;
50 class LightApp_SelectionMgr;
63 * Class : SMESHGUI_MultiEditDlg
64 * Description : Base class for dialogs of diagonal inversion and
65 * union of two neighboring triangles
68 class SMESHGUI_EXPORT SMESHGUI_MultiEditDlg : public SMESHGUI_PreviewDlg
73 SMESHGUI_MultiEditDlg( SMESHGUI*, const int, const bool = false );
74 virtual ~SMESHGUI_MultiEditDlg();
78 bool eventFilter( QObject*, QEvent* );
81 void ListContensChanged();
85 virtual bool onApply();
86 virtual void reject();
90 void onSelectionDone();
96 void onListSelectionChanged();
99 virtual void onToAllChk();
100 void onFilterAccepted();
101 void on3d2dChanged(int);
103 SMESH::NumericalFunctor_ptr getNumericalFunctor();
106 void enterEvent( QEvent * );
107 void keyPressEvent( QKeyEvent* );
108 QWidget* createButtonFrame( QWidget* );
109 QWidget* createMainFrame( QWidget*, const bool );
110 virtual bool isValid( const bool );
111 SMESH::long_array_var getIds(SMESH::SMESH_IDSource_var& obj);
112 void updateButtons();
113 void setSelectionMode();
114 virtual bool isIdValid( const int ) const;
115 virtual bool process( SMESH::SMESH_MeshEditor_ptr,
116 const SMESH::long_array& ,
117 SMESH::SMESH_IDSource_ptr obj) = 0;
121 QPushButton* myOkBtn;
122 QPushButton* myApplyBtn;
123 QPushButton* myCloseBtn;
124 QPushButton* myHelpBtn;
125 SMESH_Actor* myActor;
126 SMESH::SMESH_Mesh_var myMesh;
128 LightApp_SelectionMgr* mySelectionMgr;
129 SVTK_Selector* mySelector;
130 SMESHGUI* mySMESHGUI;
133 QGroupBox* myCriterionGrp;
135 QWidget* myChoiceWidget;
136 QButtonGroup* myGroupChoice;
137 QComboBox* myComboBoxFunctor;
139 QListWidget* myListBox;
140 QPushButton* myFilterBtn;
141 QPushButton* myAddBtn;
142 QPushButton* myRemoveBtn;
143 QPushButton* mySortBtn;
145 QCheckBox* myToAllChk;
146 QButtonGroup* myEntityTypeGrp;
148 QCheckBox* mySubmeshChk;
149 QPushButton* mySubmeshBtn;
150 QLineEdit* mySubmesh;
152 QCheckBox* myGroupChk;
153 QPushButton* myGroupBtn;
156 SMESHGUI_FilterDlg* myFilterDlg;
157 TColStd_MapOfInteger myIds;
162 QString myHelpFileName;
166 * Class : SMESHGUI_ChangeOrientationDlg
167 * Description : Modification of orientation of faces
169 class SMESHGUI_ChangeOrientationDlg : public SMESHGUI_MultiEditDlg
174 SMESHGUI_ChangeOrientationDlg( SMESHGUI* );
175 virtual ~SMESHGUI_ChangeOrientationDlg();
178 virtual bool process( SMESH::SMESH_MeshEditor_ptr,
179 const SMESH::long_array& ,
180 SMESH::SMESH_IDSource_ptr obj);
184 * Class : SMESHGUI_UnionOfTrianglesDlg
185 * Description : Construction of quadrangles by automatic association of triangles
187 class SMESHGUI_UnionOfTrianglesDlg : public SMESHGUI_MultiEditDlg
192 SMESHGUI_UnionOfTrianglesDlg( SMESHGUI* );
193 virtual ~SMESHGUI_UnionOfTrianglesDlg();
196 virtual bool isValid( const bool );
197 virtual bool process( SMESH::SMESH_MeshEditor_ptr,
198 const SMESH::long_array&,
199 SMESH::SMESH_IDSource_ptr obj );
202 virtual void onDisplaySimulation( bool );
205 SMESHGUI_SpinBox* myMaxAngleSpin;
209 Class : SMESHGUI_CuttingOfQuadsDlg
210 Description : Construction of quadrangles by automatic association of triangles
212 class SMESHGUI_CuttingOfQuadsDlg : public SMESHGUI_MultiEditDlg
217 SMESHGUI_CuttingOfQuadsDlg( SMESHGUI* );
218 virtual ~SMESHGUI_CuttingOfQuadsDlg();
221 virtual bool process( SMESH::SMESH_MeshEditor_ptr,
222 const SMESH::long_array& ,
223 SMESH::SMESH_IDSource_ptr obj);
226 virtual void reject();
227 void onCriterionRB();
231 void displayPreview();
235 SALOME_Actor* myPreviewActor;
236 QCheckBox* myPreviewChk;
240 * Class : SMESHGUI_CuttingIntoTetraDlg
241 * Description : Split all volumes into tetrahedrons
243 class SMESHGUI_CuttingIntoTetraDlg : public SMESHGUI_MultiEditDlg
248 SMESHGUI_CuttingIntoTetraDlg( SMESHGUI* );
249 virtual ~SMESHGUI_CuttingIntoTetraDlg();
252 virtual bool process( SMESH::SMESH_MeshEditor_ptr,
253 const SMESH::long_array&,
254 SMESH::SMESH_IDSource_ptr obj );
257 #endif // SMESHGUI_MULTIEDITDLG_H