Salome HOME
yfr : Merge with v1.2
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_MoveNodesDlg.h
1 //  File      : SMESHGUI_MoveNodesDlg.h
2 //  Created   : Thu Jun 20 22:30:22 2002
3 //  Author    : Nicolas REJNERI
4
5 //  Project   : SALOME
6 //  Module    : SMESH
7 //  Copyright : Open CASCADE 2002
8 //  $Header$
9
10
11 #ifndef DIALOGBOX_MOVE_NODES_H
12 #define DIALOGBOX_MOVE_NODES_H
13
14 #include "SALOME_Selection.h"
15
16 // QT Includes
17 #include <qvariant.h>
18 #include <qdialog.h>
19
20 // Open CASCADE Includes
21 #include <TColStd_MapOfInteger.hxx>
22
23 class QVBoxLayout; 
24 class QHBoxLayout; 
25 class QGridLayout; 
26 class QButtonGroup;
27 class QGroupBox;
28 class QLabel;
29 class QLineEdit;
30 class QPushButton;
31 class QRadioButton;
32 class SMESHGUI;
33 class SMESHGUI_SpinBox;
34
35 // IDL Headers
36 #include <SALOMEconfig.h>
37 #include CORBA_SERVER_HEADER(SMESH_Mesh)
38
39 // VTK Include
40 #include <vtkActor.h>
41
42 //=================================================================================
43 // class    : SMESHGUI_MoveNodesDlg
44 // purpose  :
45 //=================================================================================
46 class SMESHGUI_MoveNodesDlg : public QDialog
47
48     Q_OBJECT
49
50 public:
51     SMESHGUI_MoveNodesDlg( QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0 );
52     ~SMESHGUI_MoveNodesDlg();
53
54 private:
55
56     void Init( SALOME_Selection* Sel ) ;
57     void closeEvent( QCloseEvent* e ) ;
58     void enterEvent ( QEvent * ) ;                          /* mouse enter the QWidget */
59
60     SMESHGUI*                     mySMESHGUI ;              /* Current SMESHGUI object */
61     SALOME_Selection*             mySelection ;             /* User shape selection */
62     bool                          myOkNodes ;               /* to check when arguments is defined */
63     int                           myConstructorId ;         /* Current constructor id = radio button id */
64     int                           myIdnode;
65     QLineEdit*                    myEditCurrentArgument;    /* Current  LineEdit */
66
67     SMESH::SMESH_Mesh_var         myMesh;
68     TColStd_MapOfInteger          myMapIndex;
69
70     vtkActor                      *mySimulationActor;
71         
72     QGroupBox* GroupCoordinates;
73     QLabel* TextLabel_X;
74     QLabel* TextLabel_Y;
75     QLabel* TextLabel_Z;
76     SMESHGUI_SpinBox* SpinBox_X;
77     SMESHGUI_SpinBox* SpinBox_Y;
78     SMESHGUI_SpinBox* SpinBox_Z;
79
80     QButtonGroup* GroupConstructors;
81     QRadioButton* Constructor1;
82     QGroupBox* GroupButtons;
83     QPushButton* buttonOk;
84     QPushButton* buttonCancel;
85     QPushButton* buttonApply;
86     QGroupBox* GroupC1;
87     QLabel* TextLabelC1A1;
88     QPushButton* SelectButtonC1A1;
89     QLineEdit* LineEditC1A1;
90
91 private slots:
92
93     void ConstructorsClicked(int constructorId);
94     void ClickOnOk();
95     void ClickOnCancel();
96     void ClickOnApply();
97     void SetEditCurrentArgument() ;
98     void SelectionIntoArgument() ;
99     void DeactivateActiveDialog() ;
100     void ActivateThisDialog() ;
101     void ValueChangedInSpinBox( double newValue ) ;
102
103 protected:
104     QGridLayout* SMESHGUI_MoveNodesDlgLayout;
105     QGridLayout* GroupConstructorsLayout;
106     QGridLayout* GroupButtonsLayout;
107     QGridLayout* GroupC1Layout;
108     QGridLayout* GroupCoordinatesLayout;
109 };
110
111 #endif // DIALOGBOX_MOVE_NODES_H