1 // Copyright (C) 2007-2021 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, or (at your option) any later version.
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
23 // File : SMESHGUI_ReorientFacesDlg.h
24 // Author : Edward AGAPOV, Open CASCADE S.A.S.
26 #ifndef SMESHGUI_ReorientFacesDlg_H
27 #define SMESHGUI_ReorientFacesDlg_H
31 #include "SMESH_SMESHGUI.hxx"
33 #include "SMESHGUI_Dialog.h"
34 #include "SMESHGUI_SelectionOp.h"
36 #include <SALOMEconfig.h>
37 #include CORBA_SERVER_HEADER(SMESH_Mesh)
42 class SMESHGUI_SpinBox;
43 class SMESHGUI_ReorientFacesDlg;
44 class SMESH_TypeFilter;
46 /*! ================================================================================
47 * \brief Operation to reorient faces according to some criterion
50 class SMESHGUI_EXPORT SMESHGUI_ReorientFacesOp: public SMESHGUI_SelectionOp
55 SMESHGUI_ReorientFacesOp();
56 virtual ~SMESHGUI_ReorientFacesOp();
58 virtual LightApp_Dialog* dlg() const;
62 virtual void startOperation();
63 virtual void stopOperation();
65 virtual SUIT_SelectionFilter* createFilter( const int ) const;
66 virtual void selectionDone();
68 bool isValid( QString& );
69 void setRefFiltersByConstructor();
74 virtual bool onApply();
77 virtual void onActivateObject( int );
78 void redisplayPreview();
79 void onTextChange( const QString& );
80 bool onlyOneObjAllowed();
84 SMESHGUI_ReorientFacesDlg* myDlg;
86 SMESH_Actor* myObjectActor;
89 SMESH_TypeFilter* myRefGroupFilter;
90 SMESH_TypeFilter* myRefSubMeshFilter;
91 SMESH_TypeFilter* myRefMeshFilter;
93 SMESH::ListOfIDSources_var myObjects;
94 SMESH::ListOfIDSources_var myRefGroups;
97 /*! ================================================================================
98 * \brief Dialog to reorient faces according to vector
101 class SMESHGUI_EXPORT SMESHGUI_ReorientFacesDlg : public SMESHGUI_Dialog
106 SMESHGUI_ReorientFacesDlg();
109 void constructorChange(int id);
112 QWidget* createMainFrame( QWidget* );
113 void setLabel( int object, const char* text );
115 QButtonGroup* myConstructorGrp;
119 QFrame* myRefGroupFrm;
120 QCheckBox* myOutsideChk;
121 SMESHGUI_SpinBox* myX;
122 SMESHGUI_SpinBox* myY;
123 SMESHGUI_SpinBox* myZ;
124 //QPushButton* myIdBtn;
126 SMESHGUI_SpinBox* myDX;
127 SMESHGUI_SpinBox* myDY;
128 SMESHGUI_SpinBox* myDZ;
130 QString myHelpFileName;
132 friend class SMESHGUI_ReorientFacesOp;
135 //void ButtonToggled( bool );
138 #endif // SMESHGUI_ReorientFacesDlg_H