]> SALOME platform Git repositories - modules/geom.git/blob - src/GEOMGUI/GeometryGUI_TranslationDlg.h
Salome HOME
NRI : First integration.
[modules/geom.git] / src / GEOMGUI / GeometryGUI_TranslationDlg.h
1 //  File      : GeometryGUI_TranslationDlg.h
2 //  Created   :
3 //  Author    : Lucien PIGNOLONI
4 //  Project   : SALOME
5 //  Module    : GeometryGUI
6 //  Copyright : OPEN CASCADE
7 //  $Header$
8
9 #ifndef DIALOGBOX_TRANSLATION_H
10 #define DIALOGBOX_TRANSLATION_H
11
12 #include "SALOME_Selection.h"
13 #include "GEOM_ShapeTypeFilter.hxx"
14 #include "GeometryGUI_SpinBox.h"
15
16 #include <gp_Vec.hxx>
17 #include <TopoDS_Shape.hxx>
18 #include <BRepBuilderAPI_Transform.hxx>
19
20 #include <qvariant.h>
21 #include <qdialog.h>
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 GeometryGUI;
33
34
35 //=================================================================================
36 // class    : GeometryGUI_TranslationDlg
37 // purpose  :
38 //=================================================================================
39 class GeometryGUI_TranslationDlg : public QDialog
40
41     Q_OBJECT
42
43 public:
44     GeometryGUI_TranslationDlg( QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0 );
45     ~GeometryGUI_TranslationDlg();
46
47 private :
48     
49     GEOM::GEOM_Gen_var               myGeom ;               /* Current Geom object */   
50     GeometryGUI*                        myGeomGUI ;            /* Current GeomGUI object */
51     TopoDS_Shape                        mySimulationTopoDs;    /* Shape used for simulation display */    
52     SALOME_Selection*                   mySelection ;          /* User shape selection */ 
53     TopoDS_Shape                        myBase ;
54     GEOM::GEOM_Shape_var                      myGeomShape ;           /* is myBase */
55     bool                                myOkBase ;
56     gp_Vec                              myVec ;
57     QLineEdit*                          myEditCurrentArgument;  /* Current LineEdit */   
58     int                                 myConstructorId ;       /* Current constructor id = radio button id */
59     Handle(GEOM_ShapeTypeFilter)        myEdgeFilter;           /* Filter selection */
60
61     void closeEvent( QCloseEvent* e ) ;
62     void enterEvent( QEvent* e);
63     void Init( SALOME_Selection* Sel ) ;
64     void MakeTranslationSimulationAndDisplay() ;
65
66     QButtonGroup* GroupConstructors;
67     QRadioButton* Constructor1;
68     QGroupBox* GroupC1;
69     QLabel* TextLabel_DX;
70     QLabel* TextLabel_DY;
71     QLabel* TextLabel_DZ;
72
73     GeometryGUI_SpinBox*  SpinBox_DX ;
74     GeometryGUI_SpinBox*  SpinBox_DY ;
75     GeometryGUI_SpinBox*  SpinBox_DZ ;
76
77     QLabel* TextLabelC1A1;
78     QPushButton* SelectButtonC1A1;
79     QLineEdit* LineEditC1A1;
80     QGroupBox* GroupButtons;
81     QPushButton* buttonOk;
82     QPushButton* buttonCancel;
83     QPushButton* buttonApply;
84
85 private slots:
86
87     void ConstructorsClicked(int constructorId);
88     void ClickOnOk();
89     void ClickOnCancel();
90     void ClickOnApply();
91     void SetEditCurrentArgument() ;
92     void SelectionIntoArgument() ;
93     void LineEditReturnPressed() ;
94     void DeactivateActiveDialog() ;
95     void ActivateThisDialog() ;
96     void ValueChangedInSpinBox( double newValue ) ;
97
98 protected:
99     QGridLayout* GeometryGUI_TranslationDlgLayout;
100     QGridLayout* GroupConstructorsLayout;
101     QGridLayout* GroupC1Layout;
102     QGridLayout* GroupButtonsLayout;
103
104     QHBoxLayout* Layout1 ;
105 };
106
107 #endif // DIALOGBOX_TRANSLATION_H