Salome HOME
23080: [CEA 1497] Do not merge a middle node in quadratic with the extreme nodes...
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_ReorientFacesDlg.h
1 // Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
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.
10 //
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.
15 //
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
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 // File   : SMESHGUI_ReorientFacesDlg.h
24 // Author : Edward AGAPOV, Open CASCADE S.A.S.
25 //
26 #ifndef SMESHGUI_ReorientFacesDlg_H
27 #define SMESHGUI_ReorientFacesDlg_H
28
29 // SMESH includes
30 #include "SMESH_SMESHGUI.hxx"
31
32 #include "SMESHGUI_Dialog.h"
33 #include "SMESHGUI_SelectionOp.h"
34
35 class QButtonGroup;
36 class QCheckBox;
37 class QLineEdit;
38 class SMESHGUI_SpinBox;
39 class SMESHGUI_ReorientFacesDlg;
40
41 /*!
42  * \brief Operation to reorient faces acoording to some criterion
43  */
44 class SMESHGUI_EXPORT SMESHGUI_ReorientFacesOp: public SMESHGUI_SelectionOp
45 {
46   Q_OBJECT
47
48 public:
49   SMESHGUI_ReorientFacesOp();
50   virtual ~SMESHGUI_ReorientFacesOp();
51
52   virtual LightApp_Dialog*       dlg() const;
53
54 protected:
55
56   virtual void                   startOperation();
57   virtual void                   stopOperation();
58
59   virtual SUIT_SelectionFilter*  createFilter( const int ) const;
60   virtual void                   selectionDone();
61
62   bool                           isValid( QString& );
63
64 protected slots:
65   virtual bool                   onApply();
66
67 private slots:
68   virtual void                   onActivateObject( int );
69   void                           redisplayPreview();
70   void                           onTextChange( const QString& );
71
72 private:
73   SMESHGUI_ReorientFacesDlg*    myDlg;
74
75   //SMESHGUI_MeshEditPreview*     myVectorPreview;
76   SMESH_Actor*                  myObjectActor;
77   int                           mySelectionMode;
78
79   SMESH::SMESH_IDSource_var     myObject;
80   SMESH::SMESH_IDSource_var     myVolumeObj;
81 };
82
83 /*!
84  * \brief Dialog to reorient faces acoording to vector
85  */
86
87 class SMESHGUI_EXPORT SMESHGUI_ReorientFacesDlg : public SMESHGUI_Dialog
88 {
89   Q_OBJECT
90
91 public:
92   SMESHGUI_ReorientFacesDlg();
93
94 public slots:
95   void constructorChange(int id);
96
97 private:
98   QWidget*                      createMainFrame( QWidget* );
99   
100   QButtonGroup*                 myConstructorGrp;
101   QFrame*                       myFaceFrm;
102   QFrame*                       myPointFrm;
103   QFrame*                       myDirFrm;
104   QFrame*                       myVolumFrm;
105   QCheckBox*                    myOutsideChk;
106   SMESHGUI_SpinBox*             myX;
107   SMESHGUI_SpinBox*             myY;
108   SMESHGUI_SpinBox*             myZ;
109   //QPushButton*                  myIdBtn;
110   //QLineEdit*                    myId;
111   SMESHGUI_SpinBox*             myDX;
112   SMESHGUI_SpinBox*             myDY;
113   SMESHGUI_SpinBox*             myDZ;
114
115   QString                       myHelpFileName;
116
117   friend class SMESHGUI_ReorientFacesOp;
118
119   //private slots:
120   //void                          ButtonToggled( bool );
121 };
122
123 #endif // SMESHGUI_ReorientFacesDlg_H