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)
38 class SMESHGUI_FilterDlg;
44 class SMESHGUI_SpinBox;
46 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* ) ;
72 void ListContensChanged();
77 virtual bool onApply();
78 virtual void onClose();
81 void onSelectionDone();
87 void onListSelectionChanged();
90 virtual void onToAllChk();
91 void onFilterAccepted();
92 void on3d2dChanged(int);
96 void closeEvent( QCloseEvent* e ) ;
97 void enterEvent ( QEvent * ) ;
98 void hideEvent ( QHideEvent * ); /* ESC key */
99 QFrame* createButtonFrame( QWidget* );
100 QFrame* createMainFrame ( QWidget*, const bool );
101 bool isValid( const bool ) const;
102 SMESH::long_array_var getIds();
103 void updateButtons();
104 void setSelectionMode();
105 virtual bool isIdValid( const int theID ) const;
106 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& ) = 0;
111 QPushButton* myOkBtn;
112 QPushButton* myApplyBtn;
113 QPushButton* myCloseBtn;
114 SALOME_Selection* mySelection;
115 SMESH::SMESH_Mesh_var myMesh;
116 SMESH_Actor* myActor;
121 QPushButton* myFilterBtn;
122 QPushButton* myAddBtn;
123 QPushButton* myRemoveBtn;
124 QPushButton* mySortBtn;
126 QCheckBox* myToAllChk;
127 QButtonGroup* myEntityTypeGrp;
129 QCheckBox* mySubmeshChk;
130 QPushButton* mySubmeshBtn;
131 QLineEdit* mySubmesh;
133 QCheckBox* myGroupChk;
134 QPushButton* myGroupBtn;
137 SMESHGUI_FilterDlg* myFilterDlg;
138 TColStd_MapOfInteger myIds;
140 Handle(SMESH_TypeFilter) mySubmeshFilter;
141 Handle(SMESH_TypeFilter) myGroupFilter;
147 Class : SMESHGUI_ChangeOrientationDlg
148 Description : Modification of orientation of faces
150 class SMESHGUI_ChangeOrientationDlg : public SMESHGUI_MultiEditDlg
155 SMESHGUI_ChangeOrientationDlg( QWidget*,
158 virtual ~SMESHGUI_ChangeOrientationDlg();
162 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
166 Class : SMESHGUI_UnionOfTrianglesDlg
167 Description : Construction of quadrangles by automatic association of triangles
169 class SMESHGUI_UnionOfTrianglesDlg : public SMESHGUI_MultiEditDlg
174 SMESHGUI_UnionOfTrianglesDlg( QWidget*,
177 virtual ~SMESHGUI_UnionOfTrianglesDlg();
181 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
185 Class : SMESHGUI_CuttingOfQuadsDlg
186 Description : Construction of quadrangles by automatic association of triangles
188 class SMESHGUI_CuttingOfQuadsDlg : public SMESHGUI_MultiEditDlg
193 SMESHGUI_CuttingOfQuadsDlg( QWidget*,
196 virtual ~SMESHGUI_CuttingOfQuadsDlg();
199 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
202 virtual void onClose();
206 void displayPreview();
210 QCheckBox* myUseDiagChk;
211 SALOME_Actor* myPreviewActor;
212 QCheckBox* myPreviewChk;