1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // File : SMESHGUI_MultiEditDlg.h
23 // Author : Sergey LITONIN, Open CASCADE S.A.S.
25 #ifndef SMESHGUI_MULTIEDITDLG_H
26 #define SMESHGUI_MULTIEDITDLG_H
29 #include "SMESH_SMESHGUI.hxx"
35 #include <TColStd_MapOfInteger.hxx>
38 #include <SALOMEconfig.h>
39 #include CORBA_SERVER_HEADER(SMESH_Mesh)
40 #include CORBA_SERVER_HEADER(SMESH_MeshEditor)
43 class SMESHGUI_FilterDlg;
44 class SMESHGUI_SpinBox;
48 class LightApp_SelectionMgr;
61 * Class : SMESHGUI_MultiEditDlg
62 * Description : Base class for dialogs of diagonal inversion and
63 * union of two neighboring triangles
66 class SMESHGUI_EXPORT SMESHGUI_MultiEditDlg : public QDialog
71 SMESHGUI_MultiEditDlg( SMESHGUI*, const int, const bool = false );
72 virtual ~SMESHGUI_MultiEditDlg();
76 bool eventFilter( QObject*, QEvent* );
79 void ListContensChanged();
83 virtual bool onApply();
84 virtual void onClose();
88 void onSelectionDone();
94 void onListSelectionChanged();
97 virtual void onToAllChk();
98 void onFilterAccepted();
99 void on3d2dChanged(int);
101 SMESH::NumericalFunctor_ptr getNumericalFunctor();
104 void closeEvent( QCloseEvent* );
105 void enterEvent( QEvent * );
106 void hideEvent( QHideEvent* ); /* ESC key */
107 void keyPressEvent( QKeyEvent* );
108 QWidget* createButtonFrame( QWidget* );
109 QWidget* createMainFrame( QWidget*, const bool );
110 virtual bool isValid( const bool );
111 SMESH::long_array_var getIds();
112 void updateButtons();
113 void setSelectionMode();
114 virtual bool isIdValid( const int ) const;
115 virtual bool process( SMESH::SMESH_MeshEditor_ptr,
116 const SMESH::long_array& ) = 0;
120 QPushButton* myOkBtn;
121 QPushButton* myApplyBtn;
122 QPushButton* myCloseBtn;
123 QPushButton* myHelpBtn;
124 SMESH_Actor* myActor;
125 SMESH::SMESH_Mesh_var myMesh;
127 LightApp_SelectionMgr* mySelectionMgr;
128 SVTK_Selector* mySelector;
129 SMESHGUI* mySMESHGUI;
132 QGroupBox* myCriterionGrp;
134 QWidget* myChoiceWidget;
135 QButtonGroup* myGroupChoice;
136 QComboBox* myComboBoxFunctor;
138 QListWidget* myListBox;
139 QPushButton* myFilterBtn;
140 QPushButton* myAddBtn;
141 QPushButton* myRemoveBtn;
142 QPushButton* mySortBtn;
144 QCheckBox* myToAllChk;
145 QButtonGroup* myEntityTypeGrp;
147 QCheckBox* mySubmeshChk;
148 QPushButton* mySubmeshBtn;
149 QLineEdit* mySubmesh;
151 QCheckBox* myGroupChk;
152 QPushButton* myGroupBtn;
155 SMESHGUI_FilterDlg* myFilterDlg;
156 TColStd_MapOfInteger myIds;
161 QString myHelpFileName;
165 * Class : SMESHGUI_ChangeOrientationDlg
166 * Description : Modification of orientation of faces
168 class SMESHGUI_ChangeOrientationDlg : public SMESHGUI_MultiEditDlg
173 SMESHGUI_ChangeOrientationDlg( SMESHGUI* );
174 virtual ~SMESHGUI_ChangeOrientationDlg();
177 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
181 * Class : SMESHGUI_UnionOfTrianglesDlg
182 * Description : Construction of quadrangles by automatic association of triangles
184 class SMESHGUI_UnionOfTrianglesDlg : public SMESHGUI_MultiEditDlg
189 SMESHGUI_UnionOfTrianglesDlg( SMESHGUI* );
190 virtual ~SMESHGUI_UnionOfTrianglesDlg();
193 virtual bool isValid( const bool );
194 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
197 SMESHGUI_SpinBox* myMaxAngleSpin;
201 Class : SMESHGUI_CuttingOfQuadsDlg
202 Description : Construction of quadrangles by automatic association of triangles
204 class SMESHGUI_CuttingOfQuadsDlg : public SMESHGUI_MultiEditDlg
209 SMESHGUI_CuttingOfQuadsDlg( SMESHGUI* );
210 virtual ~SMESHGUI_CuttingOfQuadsDlg();
213 virtual bool process( SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array& );
216 virtual void onClose();
217 void onCriterionRB();
221 void displayPreview();
225 SALOME_Actor* myPreviewActor;
226 QCheckBox* myPreviewChk;
229 #endif // SMESHGUI_MULTIEDITDLG_H