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