1 // Copyright (C) 2003 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
22 // File : SMESHGUI_MultiEditDlg.h
23 // Author : Sergey LITONIN
27 #ifndef SMESHGUI_MultiEditDlg_H
28 #define SMESHGUI_MultiEditDlg_H
30 #include "SMESH_SMESHGUI.hxx"
34 #include "SUIT_SelectionFilter.h"
36 #include <TColStd_MapOfInteger.hxx>
38 #include <SALOMEconfig.h>
39 #include CORBA_SERVER_HEADER(SMESH_Mesh)
40 #include CORBA_SERVER_HEADER(SMESH_Filter)
43 class SMESHGUI_FilterDlg;
44 class SMESHGUI_SpinBox;
48 class LightApp_SelectionMgr;
51 class SVTK_ViewWindow;
64 * Class : SMESHGUI_MultiEditDlg
65 * Description : Base class for dialogs of diagonal inversion and
66 * union of two neighboring triangles
69 class SMESHGUI_EXPORT SMESHGUI_MultiEditDlg : public QDialog
74 SMESHGUI_MultiEditDlg(SMESHGUI* theModule,
78 virtual ~SMESHGUI_MultiEditDlg();
82 bool eventFilter( QObject* object, QEvent* event );
85 void ListContensChanged();
89 virtual bool onApply();
90 virtual void onClose();
94 void onSelectionDone();
100 void onListSelectionChanged();
103 virtual void onToAllChk();
104 void onFilterAccepted();
105 void on3d2dChanged(int);
107 SMESH::NumericalFunctor_ptr getNumericalFunctor();
110 void closeEvent( QCloseEvent* e ) ;
111 void enterEvent ( QEvent * ) ;
112 void hideEvent ( QHideEvent * ); /* ESC key */
113 void keyPressEvent( QKeyEvent* );
114 QFrame* createButtonFrame( QWidget* );
115 QFrame* createMainFrame ( QWidget*, const bool );
116 bool isValid( const bool ) const;
117 SMESH::long_array_var getIds();
118 void updateButtons();
119 void setSelectionMode();
120 virtual bool isIdValid( const int theID ) const;
121 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& ) = 0;
125 QPushButton* myOkBtn;
126 QPushButton* myApplyBtn;
127 QPushButton* myCloseBtn;
128 QPushButton* myHelpBtn;
129 SMESH_Actor* myActor;
130 SMESH::SMESH_Mesh_var myMesh;
132 LightApp_SelectionMgr* mySelectionMgr;
133 SVTK_Selector* mySelector;
134 SMESHGUI* mySMESHGUI;
137 QGroupBox* myCriterionGrp;
139 QButtonGroup* myGroupChoice;
140 QComboBox* myComboBoxFunctor;
143 QPushButton* myFilterBtn;
144 QPushButton* myAddBtn;
145 QPushButton* myRemoveBtn;
146 QPushButton* mySortBtn;
148 QCheckBox* myToAllChk;
149 QButtonGroup* myEntityTypeGrp;
151 QCheckBox* mySubmeshChk;
152 QPushButton* mySubmeshBtn;
153 QLineEdit* mySubmesh;
155 QCheckBox* myGroupChk;
156 QPushButton* myGroupBtn;
159 SMESHGUI_FilterDlg* myFilterDlg;
160 TColStd_MapOfInteger myIds;
165 QString myHelpFileName;
169 * Class : SMESHGUI_ChangeOrientationDlg
170 * Description : Modification of orientation of faces
172 class SMESHGUI_ChangeOrientationDlg : public SMESHGUI_MultiEditDlg
177 SMESHGUI_ChangeOrientationDlg(SMESHGUI* theModule,
179 virtual ~SMESHGUI_ChangeOrientationDlg();
182 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
186 * Class : SMESHGUI_UnionOfTrianglesDlg
187 * Description : Construction of quadrangles by automatic association of triangles
189 class SMESHGUI_UnionOfTrianglesDlg : public SMESHGUI_MultiEditDlg
194 SMESHGUI_UnionOfTrianglesDlg(SMESHGUI* theModule,
196 virtual ~SMESHGUI_UnionOfTrianglesDlg();
199 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
202 SMESHGUI_SpinBox* myMaxAngleSpin;
206 Class : SMESHGUI_CuttingOfQuadsDlg
207 Description : Construction of quadrangles by automatic association of triangles
209 class SMESHGUI_CuttingOfQuadsDlg : public SMESHGUI_MultiEditDlg
214 SMESHGUI_CuttingOfQuadsDlg(SMESHGUI* theModule,
216 virtual ~SMESHGUI_CuttingOfQuadsDlg();
219 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
222 virtual void onClose();
223 void onCriterionRB();
227 void displayPreview();
231 SALOME_Actor* myPreviewActor;
232 QCheckBox* myPreviewChk;