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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
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)
39 class SMESHGUI_FilterDlg;
45 class SMESHGUI_SpinBox;
52 class SalomeApp_SelectionMgr;
57 class SVTK_ViewWindow;
60 Class : SMESHGUI_MultiEditDlg
61 Description : Base class for dialogs of diagonal inversion and
62 union of two neighboring triangles
65 class SMESHGUI_MultiEditDlg : public QDialog
70 SMESHGUI_MultiEditDlg(SMESHGUI* theModule,
74 virtual ~SMESHGUI_MultiEditDlg();
78 bool eventFilter( QObject* object, QEvent* event );
81 void ListContensChanged();
86 virtual bool onApply();
87 virtual void onClose();
90 void onSelectionDone();
96 void onListSelectionChanged();
99 virtual void onToAllChk();
100 void onFilterAccepted();
101 void on3d2dChanged(int);
105 void closeEvent( QCloseEvent* e ) ;
106 void enterEvent ( QEvent * ) ;
107 void hideEvent ( QHideEvent * ); /* ESC key */
108 QFrame* createButtonFrame( QWidget* );
109 QFrame* createMainFrame ( QWidget*, const bool );
110 bool isValid( const bool ) const;
111 SMESH::long_array_var getIds();
112 void updateButtons();
113 void setSelectionMode();
114 virtual bool isIdValid( const int theID ) const;
115 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& ) = 0;
120 QPushButton* myOkBtn;
121 QPushButton* myApplyBtn;
122 QPushButton* myCloseBtn;
123 SMESH_Actor* myActor;
124 SMESH::SMESH_Mesh_var myMesh;
126 SalomeApp_SelectionMgr* mySelectionMgr;
127 SVTK_Selector* mySelector;
128 SMESHGUI* mySMESHGUI;
133 QPushButton* myFilterBtn;
134 QPushButton* myAddBtn;
135 QPushButton* myRemoveBtn;
136 QPushButton* mySortBtn;
138 QCheckBox* myToAllChk;
139 QButtonGroup* myEntityTypeGrp;
141 QCheckBox* mySubmeshChk;
142 QPushButton* mySubmeshBtn;
143 QLineEdit* mySubmesh;
145 QCheckBox* myGroupChk;
146 QPushButton* myGroupBtn;
149 SMESHGUI_FilterDlg* myFilterDlg;
150 TColStd_MapOfInteger myIds;
157 Class : SMESHGUI_ChangeOrientationDlg
158 Description : Modification of orientation of faces
160 class SMESHGUI_ChangeOrientationDlg : public SMESHGUI_MultiEditDlg
165 SMESHGUI_ChangeOrientationDlg(SMESHGUI* theModule,
167 virtual ~SMESHGUI_ChangeOrientationDlg();
171 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
175 Class : SMESHGUI_UnionOfTrianglesDlg
176 Description : Construction of quadrangles by automatic association of triangles
178 class SMESHGUI_UnionOfTrianglesDlg : public SMESHGUI_MultiEditDlg
183 SMESHGUI_UnionOfTrianglesDlg(SMESHGUI* theModule,
185 virtual ~SMESHGUI_UnionOfTrianglesDlg();
189 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
193 Class : SMESHGUI_CuttingOfQuadsDlg
194 Description : Construction of quadrangles by automatic association of triangles
196 class SMESHGUI_CuttingOfQuadsDlg : public SMESHGUI_MultiEditDlg
201 SMESHGUI_CuttingOfQuadsDlg(SMESHGUI* theModule,
203 virtual ~SMESHGUI_CuttingOfQuadsDlg();
206 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
209 virtual void onClose();
213 void displayPreview();
217 QCheckBox* myUseDiagChk;
218 SALOME_Actor* myPreviewActor;
219 QCheckBox* myPreviewChk;