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
32 #include "SUIT_SelectionFilter.h"
34 #include <TColStd_MapOfInteger.hxx>
36 #include <SALOMEconfig.h>
37 #include CORBA_SERVER_HEADER(SMESH_Mesh)
38 #include CORBA_SERVER_HEADER(SMESH_Filter)
41 class SMESHGUI_FilterDlg;
42 class SMESHGUI_SpinBox;
46 class LightApp_SelectionMgr;
49 class SVTK_ViewWindow;
62 * Class : SMESHGUI_MultiEditDlg
63 * Description : Base class for dialogs of diagonal inversion and
64 * union of two neighboring triangles
67 class SMESHGUI_MultiEditDlg : public QDialog
72 SMESHGUI_MultiEditDlg(SMESHGUI* theModule,
76 virtual ~SMESHGUI_MultiEditDlg();
80 bool eventFilter( QObject* object, QEvent* event );
83 void ListContensChanged();
87 virtual bool onApply();
88 virtual void onClose();
92 void onSelectionDone();
98 void onListSelectionChanged();
101 virtual void onToAllChk();
102 void onFilterAccepted();
103 void on3d2dChanged(int);
105 SMESH::NumericalFunctor_ptr getNumericalFunctor();
108 void closeEvent( QCloseEvent* e ) ;
109 void enterEvent ( QEvent * ) ;
110 void hideEvent ( QHideEvent * ); /* ESC key */
111 void keyPressEvent( QKeyEvent* );
112 QFrame* createButtonFrame( QWidget* );
113 QFrame* createMainFrame ( QWidget*, const bool );
114 bool isValid( const bool ) const;
115 SMESH::long_array_var getIds();
116 void updateButtons();
117 void setSelectionMode();
118 virtual bool isIdValid( const int theID ) const;
119 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& ) = 0;
123 QPushButton* myOkBtn;
124 QPushButton* myApplyBtn;
125 QPushButton* myCloseBtn;
126 QPushButton* myHelpBtn;
127 SMESH_Actor* myActor;
128 SMESH::SMESH_Mesh_var myMesh;
130 LightApp_SelectionMgr* mySelectionMgr;
131 SVTK_Selector* mySelector;
132 SMESHGUI* mySMESHGUI;
135 QGroupBox* myCriterionGrp;
137 QButtonGroup* myGroupChoice;
138 QComboBox* myComboBoxFunctor;
141 QPushButton* myFilterBtn;
142 QPushButton* myAddBtn;
143 QPushButton* myRemoveBtn;
144 QPushButton* mySortBtn;
146 QCheckBox* myToAllChk;
147 QButtonGroup* myEntityTypeGrp;
149 QCheckBox* mySubmeshChk;
150 QPushButton* mySubmeshBtn;
151 QLineEdit* mySubmesh;
153 QCheckBox* myGroupChk;
154 QPushButton* myGroupBtn;
157 SMESHGUI_FilterDlg* myFilterDlg;
158 TColStd_MapOfInteger myIds;
163 QString myHelpFileName;
167 * Class : SMESHGUI_ChangeOrientationDlg
168 * Description : Modification of orientation of faces
170 class SMESHGUI_ChangeOrientationDlg : public SMESHGUI_MultiEditDlg
175 SMESHGUI_ChangeOrientationDlg(SMESHGUI* theModule,
177 virtual ~SMESHGUI_ChangeOrientationDlg();
180 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
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* theModule,
194 virtual ~SMESHGUI_UnionOfTrianglesDlg();
197 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
200 SMESHGUI_SpinBox* myMaxAngleSpin;
204 Class : SMESHGUI_CuttingOfQuadsDlg
205 Description : Construction of quadrangles by automatic association of triangles
207 class SMESHGUI_CuttingOfQuadsDlg : public SMESHGUI_MultiEditDlg
212 SMESHGUI_CuttingOfQuadsDlg(SMESHGUI* theModule,
214 virtual ~SMESHGUI_CuttingOfQuadsDlg();
217 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
220 virtual void onClose();
221 void onCriterionRB();
225 void displayPreview();
229 SALOME_Actor* myPreviewActor;
230 QCheckBox* myPreviewChk;