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
31 #include "SMESH_TypeFilter.hxx"
32 #include <TColStd_MapOfInteger.hxx>
34 #include <SALOMEconfig.h>
35 #include CORBA_SERVER_HEADER(SMESH_Mesh)
37 class SMESHGUI_FilterDlg;
43 class SMESHGUI_SpinBox;
45 class SALOME_Selection;
52 Class : SMESHGUI_MultiEditDlg
53 Description : Base class for dialogs of diagonal inversion and
54 union of two neighboring triangles
57 class SMESHGUI_MultiEditDlg : public QDialog
62 SMESHGUI_MultiEditDlg( QWidget*,
67 virtual ~SMESHGUI_MultiEditDlg();
69 void Init( SALOME_Selection* ) ;
71 bool eventFilter( QObject* object, QEvent* event );
74 void ListContensChanged();
79 virtual bool onApply();
80 virtual void onClose();
83 void onSelectionDone();
89 void onListSelectionChanged();
92 virtual void onToAllChk();
93 void onFilterAccepted();
94 void on3d2dChanged(int);
98 void closeEvent( QCloseEvent* e ) ;
99 void enterEvent ( QEvent * ) ;
100 void hideEvent ( QHideEvent * ); /* ESC key */
101 QFrame* createButtonFrame( QWidget* );
102 QFrame* createMainFrame ( QWidget*, const bool );
103 bool isValid( const bool );
104 SMESH::long_array_var getIds();
105 void updateButtons();
106 void setSelectionMode();
107 virtual bool isIdValid( const int theID ) const;
108 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& ) = 0;
113 QPushButton* myOkBtn;
114 QPushButton* myApplyBtn;
115 QPushButton* myCloseBtn;
116 SALOME_Selection* mySelection;
117 SMESH::SMESH_Mesh_var myMesh;
118 SMESH_Actor* myActor;
123 QPushButton* myFilterBtn;
124 QPushButton* myAddBtn;
125 QPushButton* myRemoveBtn;
126 QPushButton* mySortBtn;
128 QCheckBox* myToAllChk;
129 QButtonGroup* myEntityTypeGrp;
131 QCheckBox* mySubmeshChk;
132 QPushButton* mySubmeshBtn;
133 QLineEdit* mySubmesh;
135 QCheckBox* myGroupChk;
136 QPushButton* myGroupBtn;
139 SMESHGUI_FilterDlg* myFilterDlg;
140 TColStd_MapOfInteger myIds;
142 Handle(SMESH_TypeFilter) mySubmeshFilter;
143 Handle(SMESH_TypeFilter) myGroupFilter;
146 Handle(SALOME_InteractiveObject) myIO;
150 Class : SMESHGUI_ChangeOrientationDlg
151 Description : Modification of orientation of faces
153 class SMESHGUI_ChangeOrientationDlg : public SMESHGUI_MultiEditDlg
158 SMESHGUI_ChangeOrientationDlg( QWidget*,
161 virtual ~SMESHGUI_ChangeOrientationDlg();
165 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
169 Class : SMESHGUI_UnionOfTrianglesDlg
170 Description : Construction of quadrangles by automatic association of triangles
172 class SMESHGUI_UnionOfTrianglesDlg : public SMESHGUI_MultiEditDlg
177 SMESHGUI_UnionOfTrianglesDlg( QWidget*,
180 virtual ~SMESHGUI_UnionOfTrianglesDlg();
184 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
188 Class : SMESHGUI_CuttingOfQuadsDlg
189 Description : Construction of quadrangles by automatic association of triangles
191 class SMESHGUI_CuttingOfQuadsDlg : public SMESHGUI_MultiEditDlg
196 SMESHGUI_CuttingOfQuadsDlg( QWidget*,
199 virtual ~SMESHGUI_CuttingOfQuadsDlg();
202 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
205 virtual void onClose();
209 void displayPreview();
213 QCheckBox* myUseDiagChk;
214 SALOME_Actor* myPreviewActor;
215 QCheckBox* myPreviewChk;