Salome HOME
correct previous integration (Porting to Python 2.6)
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_MoveNodesDlg.h
1 //  Copyright (C) 2007-2008  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.
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 // SMESH SMESHGUI : GUI for SMESH component
23 // File   : SMESHGUI_MoveNodesDlg.h
24 // Author : Nicolas REJNERI, Open CASCADE S.A.S.
25 //
26 #ifndef SMESHGUI_MOVENODESDLG_H
27 #define SMESHGUI_MOVENODESDLG_H
28
29 // SMESH includes
30 #include "SMESH_SMESHGUI.hxx"
31
32 // Qt includes
33 #include <QDialog>
34
35 class QLineEdit;
36 class QPushButton;
37
38 class SMESHGUI;
39 class SMESH_Actor;
40 class SMESHGUI_SpinBox;
41 class SALOME_Actor;
42 class SVTK_Selector;
43 class LightApp_SelectionMgr;
44
45 //=================================================================================
46 // class    : SMESHGUI_MoveNodesDlg
47 // purpose  :
48 //=================================================================================
49 class SMESHGUI_EXPORT SMESHGUI_MoveNodesDlg : public QDialog
50
51   Q_OBJECT
52
53 public:
54   SMESHGUI_MoveNodesDlg( SMESHGUI* );
55   virtual ~SMESHGUI_MoveNodesDlg();
56     
57   void                          Init();
58
59 private slots:
60   void                          onOk();
61   bool                          onApply();
62   void                          onClose();
63   void                          onHelp();
64
65   void                          onDeactivate();
66
67   void                          onSelectionDone();
68   void                          redisplayPreview();
69   void                          onTextChange( const QString& );
70
71 private:
72   void                          closeEvent( QCloseEvent* );
73   void                          enterEvent( QEvent* );
74   void                          hideEvent( QHideEvent* );
75   void                          keyPressEvent( QKeyEvent* );
76   void                          erasePreview();
77   QWidget*                      createButtonFrame( QWidget* );
78   QWidget*                      createMainFrame  ( QWidget* );
79   bool                          isValid( const bool );
80   void                          reset();
81   void                          updateButtons();
82
83 private:
84   QPushButton*                  myOkBtn;
85   QPushButton*                  myApplyBtn;
86   QPushButton*                  myCloseBtn;
87   QPushButton*                  myHelpBtn;
88   
89   QLineEdit*                    myId;
90   SMESHGUI_SpinBox*             myX;
91   SMESHGUI_SpinBox*             myY;
92   SMESHGUI_SpinBox*             myZ;
93
94   LightApp_SelectionMgr*        mySelectionMgr;
95   SVTK_Selector*                mySelector;
96   SMESHGUI*                     mySMESHGUI;
97   
98   SALOME_Actor*                 myPreviewActor;
99   SMESH_Actor*                  myMeshActor;
100   bool                          myBusy;
101
102   QString                       myHelpFileName;
103 };
104
105 #endif // SMESHGUI_MOVENODESDLG_H