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;
44 class SALOME_Selection;
51 Class : SMESHGUI_MultiEditDlg
52 Description : Base class for dialogs of diagonal inversion and
53 union of two neighboring triangles
56 class SMESHGUI_MultiEditDlg : public QDialog
61 SMESHGUI_MultiEditDlg( QWidget*,
66 virtual ~SMESHGUI_MultiEditDlg();
68 void Init( SALOME_Selection* ) ;
70 bool eventFilter( QObject* object, QEvent* event );
73 void ListContensChanged();
78 virtual bool onApply();
79 virtual void onClose();
82 void onSelectionDone();
88 void onListSelectionChanged();
91 virtual void onToAllChk();
92 void onFilterAccepted();
93 void on3d2dChanged(int);
97 void closeEvent( QCloseEvent* e ) ;
98 void enterEvent ( QEvent * ) ;
99 void hideEvent ( QHideEvent * ); /* ESC key */
100 QFrame* createButtonFrame( QWidget* );
101 QFrame* createMainFrame ( QWidget*, const bool );
102 bool isValid( const bool ) const;
103 SMESH::long_array_var getIds();
104 void updateButtons();
105 void setSelectionMode();
106 virtual bool isIdValid( const int theID ) const;
107 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& ) = 0;
112 QPushButton* myOkBtn;
113 QPushButton* myApplyBtn;
114 QPushButton* myCloseBtn;
115 SALOME_Selection* mySelection;
116 SMESH::SMESH_Mesh_var myMesh;
117 SMESH_Actor* myActor;
122 QPushButton* myFilterBtn;
123 QPushButton* myAddBtn;
124 QPushButton* myRemoveBtn;
125 QPushButton* mySortBtn;
127 QCheckBox* myToAllChk;
128 QButtonGroup* myEntityTypeGrp;
130 QCheckBox* mySubmeshChk;
131 QPushButton* mySubmeshBtn;
132 QLineEdit* mySubmesh;
134 QCheckBox* myGroupChk;
135 QPushButton* myGroupBtn;
138 SMESHGUI_FilterDlg* myFilterDlg;
139 TColStd_MapOfInteger myIds;
141 Handle(SMESH_TypeFilter) mySubmeshFilter;
142 Handle(SMESH_TypeFilter) myGroupFilter;
148 Class : SMESHGUI_ChangeOrientationDlg
149 Description : Modification of orientation of faces
151 class SMESHGUI_ChangeOrientationDlg : public SMESHGUI_MultiEditDlg
156 SMESHGUI_ChangeOrientationDlg( QWidget*,
159 virtual ~SMESHGUI_ChangeOrientationDlg();
163 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
167 Class : SMESHGUI_UnionOfTrianglesDlg
168 Description : Construction of quadrangles by automatic association of triangles
170 class SMESHGUI_UnionOfTrianglesDlg : public SMESHGUI_MultiEditDlg
175 SMESHGUI_UnionOfTrianglesDlg( QWidget*,
178 virtual ~SMESHGUI_UnionOfTrianglesDlg();
182 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
186 Class : SMESHGUI_CuttingOfQuadsDlg
187 Description : Construction of quadrangles by automatic association of triangles
189 class SMESHGUI_CuttingOfQuadsDlg : public SMESHGUI_MultiEditDlg
194 SMESHGUI_CuttingOfQuadsDlg( QWidget*,
197 virtual ~SMESHGUI_CuttingOfQuadsDlg();
200 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
203 virtual void onClose();
207 void displayPreview();
211 QCheckBox* myUseDiagChk;
212 SALOME_Actor* myPreviewActor;
213 QCheckBox* myPreviewChk;