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)
41 #include CORBA_SERVER_HEADER(SMESH_MeshEditor)
44 class SMESHGUI_FilterDlg;
45 class SMESHGUI_SpinBox;
49 class LightApp_SelectionMgr;
52 class SVTK_ViewWindow;
65 * Class : SMESHGUI_MultiEditDlg
66 * Description : Base class for dialogs of diagonal inversion and
67 * union of two neighboring triangles
70 class SMESHGUI_EXPORT SMESHGUI_MultiEditDlg : public QDialog
75 SMESHGUI_MultiEditDlg(SMESHGUI* theModule,
79 virtual ~SMESHGUI_MultiEditDlg();
83 bool eventFilter( QObject* object, QEvent* event );
86 void ListContensChanged();
90 virtual bool onApply();
91 virtual void onClose();
95 void onSelectionDone();
100 void onSortListBtn();
101 void onListSelectionChanged();
104 virtual void onToAllChk();
105 void onFilterAccepted();
106 void on3d2dChanged(int);
108 SMESH::NumericalFunctor_ptr getNumericalFunctor();
111 void closeEvent( QCloseEvent* e ) ;
112 void enterEvent ( QEvent * ) ;
113 void hideEvent ( QHideEvent * ); /* ESC key */
114 void keyPressEvent( QKeyEvent* );
115 QFrame* createButtonFrame( QWidget* );
116 QFrame* createMainFrame ( QWidget*, const bool );
117 bool isValid( const bool ) const;
118 SMESH::long_array_var getIds();
119 void updateButtons();
120 void setSelectionMode();
121 virtual bool isIdValid( const int theID ) const;
122 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& ) = 0;
126 QPushButton* myOkBtn;
127 QPushButton* myApplyBtn;
128 QPushButton* myCloseBtn;
129 QPushButton* myHelpBtn;
130 SMESH_Actor* myActor;
131 SMESH::SMESH_Mesh_var myMesh;
133 LightApp_SelectionMgr* mySelectionMgr;
134 SVTK_Selector* mySelector;
135 SMESHGUI* mySMESHGUI;
138 QGroupBox* myCriterionGrp;
140 QButtonGroup* myGroupChoice;
141 QComboBox* myComboBoxFunctor;
144 QPushButton* myFilterBtn;
145 QPushButton* myAddBtn;
146 QPushButton* myRemoveBtn;
147 QPushButton* mySortBtn;
149 QCheckBox* myToAllChk;
150 QButtonGroup* myEntityTypeGrp;
152 QCheckBox* mySubmeshChk;
153 QPushButton* mySubmeshBtn;
154 QLineEdit* mySubmesh;
156 QCheckBox* myGroupChk;
157 QPushButton* myGroupBtn;
160 SMESHGUI_FilterDlg* myFilterDlg;
161 TColStd_MapOfInteger myIds;
166 QString myHelpFileName;
170 * Class : SMESHGUI_ChangeOrientationDlg
171 * Description : Modification of orientation of faces
173 class SMESHGUI_ChangeOrientationDlg : public SMESHGUI_MultiEditDlg
178 SMESHGUI_ChangeOrientationDlg(SMESHGUI* theModule,
180 virtual ~SMESHGUI_ChangeOrientationDlg();
183 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
187 * Class : SMESHGUI_UnionOfTrianglesDlg
188 * Description : Construction of quadrangles by automatic association of triangles
190 class SMESHGUI_UnionOfTrianglesDlg : public SMESHGUI_MultiEditDlg
195 SMESHGUI_UnionOfTrianglesDlg(SMESHGUI* theModule,
197 virtual ~SMESHGUI_UnionOfTrianglesDlg();
200 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
203 SMESHGUI_SpinBox* myMaxAngleSpin;
207 Class : SMESHGUI_CuttingOfQuadsDlg
208 Description : Construction of quadrangles by automatic association of triangles
210 class SMESHGUI_CuttingOfQuadsDlg : public SMESHGUI_MultiEditDlg
215 SMESHGUI_CuttingOfQuadsDlg(SMESHGUI* theModule,
217 virtual ~SMESHGUI_CuttingOfQuadsDlg();
220 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
223 virtual void onClose();
224 void onCriterionRB();
228 void displayPreview();
232 SALOME_Actor* myPreviewActor;
233 QCheckBox* myPreviewChk;