1 // File : GeometryGUI_OrientationDlg.h
3 // Author : Lucien PIGNOLONI
5 // Module : GeometryGUI
6 // Copyright : OPEN CASCADE
9 #ifndef DIALOGBOX_ORIENTATION_H
10 #define DIALOGBOX_ORIENTATION_H
12 #include "SALOME_Selection.h"
13 #include "GEOM_ShapeTypeFilter.hxx"
14 #include "GeometryGUI_SpinBox.h"
16 #include <Precision.hxx>
20 #include <qvalidator.h>
35 //=================================================================================
36 // class : DialogBox_ORIENTATION
38 //=================================================================================
39 class GeometryGUI_OrientationDlg : public QDialog
44 GeometryGUI_OrientationDlg( QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0 );
45 ~GeometryGUI_OrientationDlg();
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 GEOM::GEOM_Shape_var myGeomShape ; /* is myShape */
54 TopoDS_Shape myShape ; /* topology used */
55 Standard_Real myLength ; /* to simulate normal vector */
58 QDoubleValidator *myVa ; /* Double validator for numeric input */
59 QLineEdit* myEditCurrentArgument; /* Current LineEdit */
60 int myConstructorId ; /* Current constructor id = radio button id */
62 void closeEvent( QCloseEvent* e ) ;
63 void enterEvent( QEvent* e);
64 void Init( SALOME_Selection* Sel ) ;
65 void MakeOrientationSimulationAndDisplay( const TopoDS_Shape& aTopoDS, Standard_Real length ) ;
67 QButtonGroup* GroupConstructors;
68 QRadioButton* Constructor1;
69 QGroupBox* GroupButtons;
70 QPushButton* buttonOk;
71 QPushButton* buttonCancel;
72 QPushButton* buttonApply;
74 QLineEdit* LineEditC1A1;
75 GeometryGUI_SpinBox* SpinBox_C1A2 ;
77 QPushButton* SelectButtonC1A1;
78 QLabel* TextLabelC1A1;
79 QLabel* TextLabelC1A2;
80 QCheckBox* CheckBoxReverse;
84 void ConstructorsClicked(int constructorId);
88 void SetEditCurrentArgument() ;
89 void SelectionIntoArgument() ;
90 void LineEditReturnPressed() ;
91 void DeactivateActiveDialog() ;
92 void ActivateThisDialog() ;
93 void ReverseOrientation(int state) ;
94 void ValueChangedInSpinBox( double newValue ) ;
98 QGridLayout* GeometryGUI_OrientationDlgLayout;
99 QGridLayout* GroupConstructorsLayout;
100 QGridLayout* GroupButtonsLayout;
101 QGridLayout* GroupC1Layout;
104 #endif // DIALOGBOX_ORIENTATION_H