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.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 // File : SMESHGUI_MultiEditDlg.h
21 // Author : Sergey LITONIN, Open CASCADE S.A.S.
24 #ifndef SMESHGUI_MULTIEDITDLG_H
25 #define SMESHGUI_MULTIEDITDLG_H
28 #include "SMESH_SMESHGUI.hxx"
34 #include <TColStd_MapOfInteger.hxx>
37 #include <SALOMEconfig.h>
38 #include CORBA_SERVER_HEADER(SMESH_Mesh)
39 #include CORBA_SERVER_HEADER(SMESH_MeshEditor)
42 class SMESHGUI_FilterDlg;
43 class SMESHGUI_SpinBox;
47 class LightApp_SelectionMgr;
60 * Class : SMESHGUI_MultiEditDlg
61 * Description : Base class for dialogs of diagonal inversion and
62 * union of two neighboring triangles
65 class SMESHGUI_EXPORT SMESHGUI_MultiEditDlg : public QDialog
70 SMESHGUI_MultiEditDlg( SMESHGUI*, const int, const bool = false );
71 virtual ~SMESHGUI_MultiEditDlg();
75 bool eventFilter( QObject*, QEvent* );
78 void ListContensChanged();
82 virtual bool onApply();
83 virtual void onClose();
87 void onSelectionDone();
93 void onListSelectionChanged();
96 virtual void onToAllChk();
97 void onFilterAccepted();
98 void on3d2dChanged(int);
100 SMESH::NumericalFunctor_ptr getNumericalFunctor();
103 void closeEvent( QCloseEvent* );
104 void enterEvent( QEvent * );
105 void hideEvent( QHideEvent* ); /* ESC key */
106 void keyPressEvent( QKeyEvent* );
107 QWidget* createButtonFrame( QWidget* );
108 QWidget* createMainFrame( QWidget*, const bool );
109 bool isValid( const bool ) const;
110 SMESH::long_array_var getIds();
111 void updateButtons();
112 void setSelectionMode();
113 virtual bool isIdValid( const int ) const;
114 virtual bool process( SMESH::SMESH_MeshEditor_ptr,
115 const SMESH::long_array& ) = 0;
119 QPushButton* myOkBtn;
120 QPushButton* myApplyBtn;
121 QPushButton* myCloseBtn;
122 QPushButton* myHelpBtn;
123 SMESH_Actor* myActor;
124 SMESH::SMESH_Mesh_var myMesh;
126 LightApp_SelectionMgr* mySelectionMgr;
127 SVTK_Selector* mySelector;
128 SMESHGUI* mySMESHGUI;
131 QGroupBox* myCriterionGrp;
133 QWidget* myChoiceWidget;
134 QButtonGroup* myGroupChoice;
135 QComboBox* myComboBoxFunctor;
137 QListWidget* myListBox;
138 QPushButton* myFilterBtn;
139 QPushButton* myAddBtn;
140 QPushButton* myRemoveBtn;
141 QPushButton* mySortBtn;
143 QCheckBox* myToAllChk;
144 QButtonGroup* myEntityTypeGrp;
146 QCheckBox* mySubmeshChk;
147 QPushButton* mySubmeshBtn;
148 QLineEdit* mySubmesh;
150 QCheckBox* myGroupChk;
151 QPushButton* myGroupBtn;
154 SMESHGUI_FilterDlg* myFilterDlg;
155 TColStd_MapOfInteger myIds;
160 QString myHelpFileName;
164 * Class : SMESHGUI_ChangeOrientationDlg
165 * Description : Modification of orientation of faces
167 class SMESHGUI_ChangeOrientationDlg : public SMESHGUI_MultiEditDlg
172 SMESHGUI_ChangeOrientationDlg( SMESHGUI* );
173 virtual ~SMESHGUI_ChangeOrientationDlg();
176 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
180 * Class : SMESHGUI_UnionOfTrianglesDlg
181 * Description : Construction of quadrangles by automatic association of triangles
183 class SMESHGUI_UnionOfTrianglesDlg : public SMESHGUI_MultiEditDlg
188 SMESHGUI_UnionOfTrianglesDlg( SMESHGUI* );
189 virtual ~SMESHGUI_UnionOfTrianglesDlg();
192 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
195 SMESHGUI_SpinBox* myMaxAngleSpin;
199 Class : SMESHGUI_CuttingOfQuadsDlg
200 Description : Construction of quadrangles by automatic association of triangles
202 class SMESHGUI_CuttingOfQuadsDlg : public SMESHGUI_MultiEditDlg
207 SMESHGUI_CuttingOfQuadsDlg( SMESHGUI* );
208 virtual ~SMESHGUI_CuttingOfQuadsDlg();
211 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
214 virtual void onClose();
215 void onCriterionRB();
219 void displayPreview();
223 SALOME_Actor* myPreviewActor;
224 QCheckBox* myPreviewChk;
227 #endif // SMESHGUI_MULTIEDITDLG_H