]> SALOME platform Git repositories - modules/smesh.git/blob - src/SMESHGUI/SMESHGUI_MoveNodesDlg.h
Salome HOME
First executable version
[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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
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
72   void                          onDeactivate();
73
74   void                          onSelectionDone();
75   void                          redisplayPreview();
76   void                          onTextChange(const QString&);
77
78 private:
79
80   void                          closeEvent( QCloseEvent* e ) ;
81   void                          enterEvent ( QEvent * ) ;
82   void                          hideEvent ( QHideEvent * );
83   void                          erasePreview();
84   QFrame*                       createButtonFrame( QWidget* );
85   QFrame*                       createMainFrame  ( QWidget* );
86   bool                          isValid( const bool ) const;
87   void                          reset();
88   void                          updateButtons();
89
90 private:
91
92   QPushButton*                  myOkBtn;
93   QPushButton*                  myApplyBtn;
94   QPushButton*                  myCloseBtn;
95   
96   QLineEdit*                    myId;
97   SMESHGUI_SpinBox*             myX;
98   SMESHGUI_SpinBox*             myY;
99   SMESHGUI_SpinBox*             myZ;
100
101   LightApp_SelectionMgr*        mySelectionMgr;
102   SVTK_Selector*                mySelector;
103   SMESHGUI*                     mySMESHGUI;
104   
105   SALOME_Actor*                 myPreviewActor;
106   SMESH_Actor*                  myMeshActor;
107   bool                          myBusy;
108 };
109
110 #endif // DIALOGBOX_MOVE_NODES_H