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_ViewWindow* myViewWindow;
128 SVTK_Selector* mySelector;
129 SMESHGUI* mySMESHGUI;
134 QPushButton* myFilterBtn;
135 QPushButton* myAddBtn;
136 QPushButton* myRemoveBtn;
137 QPushButton* mySortBtn;
139 QCheckBox* myToAllChk;
140 QButtonGroup* myEntityTypeGrp;
142 QCheckBox* mySubmeshChk;
143 QPushButton* mySubmeshBtn;
144 QLineEdit* mySubmesh;
146 QCheckBox* myGroupChk;
147 QPushButton* myGroupBtn;
150 SMESHGUI_FilterDlg* myFilterDlg;
151 TColStd_MapOfInteger myIds;
158 Class : SMESHGUI_ChangeOrientationDlg
159 Description : Modification of orientation of faces
161 class SMESHGUI_ChangeOrientationDlg : public SMESHGUI_MultiEditDlg
166 SMESHGUI_ChangeOrientationDlg(SMESHGUI* theModule,
168 virtual ~SMESHGUI_ChangeOrientationDlg();
172 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
176 Class : SMESHGUI_UnionOfTrianglesDlg
177 Description : Construction of quadrangles by automatic association of triangles
179 class SMESHGUI_UnionOfTrianglesDlg : public SMESHGUI_MultiEditDlg
184 SMESHGUI_UnionOfTrianglesDlg(SMESHGUI* theModule,
186 virtual ~SMESHGUI_UnionOfTrianglesDlg();
190 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
194 Class : SMESHGUI_CuttingOfQuadsDlg
195 Description : Construction of quadrangles by automatic association of triangles
197 class SMESHGUI_CuttingOfQuadsDlg : public SMESHGUI_MultiEditDlg
202 SMESHGUI_CuttingOfQuadsDlg(SMESHGUI* theModule,
204 virtual ~SMESHGUI_CuttingOfQuadsDlg();
207 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
210 virtual void onClose();
214 void displayPreview();
218 QCheckBox* myUseDiagChk;
219 SALOME_Actor* myPreviewActor;
220 QCheckBox* myPreviewChk;