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 ) const;
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;
149 Class : SMESHGUI_ChangeOrientationDlg
150 Description : Modification of orientation of faces
152 class SMESHGUI_ChangeOrientationDlg : public SMESHGUI_MultiEditDlg
157 SMESHGUI_ChangeOrientationDlg( QWidget*,
160 virtual ~SMESHGUI_ChangeOrientationDlg();
164 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
168 Class : SMESHGUI_UnionOfTrianglesDlg
169 Description : Construction of quadrangles by automatic association of triangles
171 class SMESHGUI_UnionOfTrianglesDlg : public SMESHGUI_MultiEditDlg
176 SMESHGUI_UnionOfTrianglesDlg( QWidget*,
179 virtual ~SMESHGUI_UnionOfTrianglesDlg();
183 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
187 Class : SMESHGUI_CuttingOfQuadsDlg
188 Description : Construction of quadrangles by automatic association of triangles
190 class SMESHGUI_CuttingOfQuadsDlg : public SMESHGUI_MultiEditDlg
195 SMESHGUI_CuttingOfQuadsDlg( QWidget*,
198 virtual ~SMESHGUI_CuttingOfQuadsDlg();
201 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
204 virtual void onClose();
208 void displayPreview();
212 QCheckBox* myUseDiagChk;
213 SALOME_Actor* myPreviewActor;
214 QCheckBox* myPreviewChk;