Salome HOME
0022480: EDF 2773 SMESH: Automatic update in SMESH
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_ReorientFacesDlg.h
1 // Copyright (C) 2007-2014  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 QLineEdit;
37 class SMESHGUI_SpinBox;
38 class SMESHGUI_ReorientFacesDlg;
39
40 /*!
41  * \brief Operation to reorient faces acoording to vector
42  */
43 class SMESHGUI_EXPORT SMESHGUI_ReorientFacesOp: public SMESHGUI_SelectionOp
44 {
45   Q_OBJECT
46
47 public:
48   SMESHGUI_ReorientFacesOp();
49   virtual ~SMESHGUI_ReorientFacesOp();
50
51   virtual LightApp_Dialog*       dlg() const;
52
53 protected:
54
55   virtual void                   startOperation();
56   virtual void                   stopOperation();
57
58   virtual SUIT_SelectionFilter*  createFilter( const int ) const;
59   virtual void                   selectionDone();
60
61   bool                           isValid( QString& );
62
63 protected slots:
64   virtual bool                   onApply();
65
66 private slots:
67   virtual void                   onActivateObject( int );
68   void                           redisplayPreview();
69   void                           onTextChange( const QString& );
70
71 private:
72   SMESHGUI_ReorientFacesDlg*    myDlg;
73
74   //SMESHGUI_MeshEditPreview*     myVectorPreview;
75   SMESH_Actor*                  myObjectActor;
76   int                           mySelectionMode;
77
78   SMESH::SMESH_IDSource_var     myObject;
79 };
80
81 /*!
82  * \brief Dialog to reorient faces acoording to vector
83  */
84
85 class SMESHGUI_EXPORT SMESHGUI_ReorientFacesDlg : public SMESHGUI_Dialog
86 {
87   Q_OBJECT
88
89 public:
90   SMESHGUI_ReorientFacesDlg();
91
92 public slots:
93   void constructorChange(int id);
94
95 private:
96   QWidget*                      createMainFrame( QWidget* );
97   
98   QButtonGroup*                 myConstructorGrp;
99   QFrame*                       myFaceFrm;
100   QFrame*                       myPointFrm;
101   SMESHGUI_SpinBox*             myX;
102   SMESHGUI_SpinBox*             myY;
103   SMESHGUI_SpinBox*             myZ;
104   //QPushButton*                  myIdBtn;
105   //QLineEdit*                    myId;
106   SMESHGUI_SpinBox*             myDX;
107   SMESHGUI_SpinBox*             myDY;
108   SMESHGUI_SpinBox*             myDZ;
109
110   QString                       myHelpFileName;
111
112   friend class SMESHGUI_ReorientFacesOp;
113
114   //private slots:
115   //void                          ButtonToggled( bool );
116 };
117
118 #endif // SMESHGUI_ReorientFacesDlg_H