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;
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*,
65 virtual ~SMESHGUI_MultiEditDlg();
67 void Init( SALOME_Selection* ) ;
70 void ListContensChanged();
75 virtual bool onApply();
76 virtual void onClose();
79 void onSelectionDone();
85 void onListSelectionChanged();
88 virtual void onToAllChk();
89 void onFilterAccepted();
93 void closeEvent( QCloseEvent* e ) ;
94 void enterEvent ( QEvent * ) ;
95 void hideEvent ( QHideEvent * ); /* ESC key */
96 QFrame* createButtonFrame( QWidget* );
97 QFrame* createMainFrame ( QWidget* );
98 bool isValid( const bool ) const;
99 SMESH::long_array_var getIds();
100 void updateButtons();
101 void setSelectionMode();
102 virtual bool isIdValid( const int theID ) const;
103 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& ) = 0;
107 QPushButton* myOkBtn;
108 QPushButton* myApplyBtn;
109 QPushButton* myCloseBtn;
110 SALOME_Selection* mySelection;
111 SMESH::SMESH_Mesh_var myMesh;
112 SMESH_Actor* myActor;
117 QPushButton* myFilterBtn;
118 QPushButton* myAddBtn;
119 QPushButton* myRemoveBtn;
120 QPushButton* mySortBtn;
122 QCheckBox* myToAllChk;
124 QCheckBox* mySubmeshChk;
125 QPushButton* mySubmeshBtn;
126 QLineEdit* mySubmesh;
128 QCheckBox* myGroupChk;
129 QPushButton* myGroupBtn;
132 SMESHGUI_FilterDlg* myFilterDlg;
133 TColStd_MapOfInteger myIds;
135 Handle(SMESH_TypeFilter) mySubmeshFilter;
136 Handle(SMESH_TypeFilter) myGroupFilter;
141 Class : SMESHGUI_ChangeOrientationDlg
142 Description : Modification of orientation of faces
144 class SMESHGUI_ChangeOrientationDlg : public SMESHGUI_MultiEditDlg
149 SMESHGUI_ChangeOrientationDlg( QWidget*,
152 virtual ~SMESHGUI_ChangeOrientationDlg();
156 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
160 Class : SMESHGUI_UnionOfTrianglesDlg
161 Description : Construction of quadrangles by automatic association of triangles
163 class SMESHGUI_UnionOfTrianglesDlg : public SMESHGUI_MultiEditDlg
168 SMESHGUI_UnionOfTrianglesDlg( QWidget*,
171 virtual ~SMESHGUI_UnionOfTrianglesDlg();
175 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
179 Class : SMESHGUI_CuttingOfQuadsDlg
180 Description : Construction of quadrangles by automatic association of triangles
182 class SMESHGUI_CuttingOfQuadsDlg : public SMESHGUI_MultiEditDlg
187 SMESHGUI_CuttingOfQuadsDlg( QWidget*,
190 virtual ~SMESHGUI_CuttingOfQuadsDlg();
193 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
196 virtual void onClose();
200 void displayPreview();
204 QCheckBox* myUseDiagChk;
205 SALOME_Actor* myPreviewActor;
206 QCheckBox* myPreviewChk;