1 // File : GeometryGUI_CylinderDlg.h
3 // Author : Lucien PIGNOLONI
5 // Module : GeometryGUI
6 // Copyright : OPEN CASCADE
9 #ifndef DIALOGBOX_CYLINDER_H
10 #define DIALOGBOX_CYLINDER_H
12 #include "SALOME_Selection.h"
14 #include "GEOM_ShapeTypeFilter.hxx"
15 #include "GEOM_EdgeFilter.hxx"
16 #include "GeometryGUI_SpinBox.h"
18 #include <BRepPrimAPI_MakeCylinder.hxx>
19 #include <Precision.hxx>
23 #include <qvalidator.h>
38 //=================================================================================
39 // class : GeometryGUI_CylinderDlg
41 //=================================================================================
42 class GeometryGUI_CylinderDlg : public QDialog
47 GeometryGUI_CylinderDlg( QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0 );
48 ~GeometryGUI_CylinderDlg();
52 void Init( SALOME_Selection* Sel ) ;
53 void closeEvent( QCloseEvent* e ) ;
54 void enterEvent ( QEvent * ) ; /* mouse enter the QWidget */
55 void MakeCylinderSimulationAndDisplay() ;
57 GEOM::GEOM_Gen_var myGeom ; /* Current GeomI object */
58 GeometryGUI* myGeomGUI ; /* Current GeomGUI object */
59 TopoDS_Shape mySimulationTopoDs ;
60 SALOME_Selection* mySelection ; /* User shape selection */
62 gp_Pnt myPoint1 ; /* topology used */
65 Standard_Real myRadius ;
66 Standard_Real myHeight ;
69 QDoubleValidator *myVa ; /* Double validator for numeric input */
70 QDoubleValidator *myVb ; /* Double validator for numeric input */
73 bool myOkDir ; /* to check when arguments is defined */
74 int myConstructorId ; /* Current constructor id = radio button id */
75 QWidget* myEditCurrentArgument; /* Current LineEdit or spin box */
76 Handle(GEOM_ShapeTypeFilter) myVertexFilter ; /* Filter selection */
77 Handle(GEOM_EdgeFilter) myEdgeFilter ; /* Filter selection */
79 QGroupBox* GroupButtons;
80 QPushButton* buttonApply;
81 QPushButton* buttonOk;
82 QPushButton* buttonCancel;
83 QButtonGroup* GroupConstructors;
84 QRadioButton* Constructor1;
85 QRadioButton* Constructor2;
88 QPushButton* SelectButtonC1A1;
89 QLineEdit* LineEditC1A1;
90 QLabel* TextLabelC1A1;
91 QPushButton* SelectButtonC1A2;
92 QLineEdit* LineEditC1A2;
93 QLabel* TextLabelC1A2;
95 QLabel* TextLabelC1A3;
96 GeometryGUI_SpinBox* SpinBox_C1A3 ;
97 QLabel* TextLabelC1A4 ;
98 GeometryGUI_SpinBox* SpinBox_C1A4 ;
100 QLabel* TextLabel_Radius ;
101 GeometryGUI_SpinBox* SpinBox_Radius ;
102 QLabel* TextLabel_Height ;
103 GeometryGUI_SpinBox* SpinBox_Height ;
107 void ConstructorsClicked(int constructorId);
109 void ClickOnCancel();
111 void SetEditCurrentArgument() ;
112 void SelectionIntoArgument() ;
113 void LineEditReturnPressed() ;
114 void DeactivateActiveDialog() ;
115 void ActivateThisDialog() ;
116 void ValueChangedInSpinBox( double newValue ) ;
119 QGridLayout* GeometryGUI_CylinderDlgLayout;
120 QGridLayout* GroupButtonsLayout;
121 QGridLayout* GroupConstructorsLayout;
122 QGridLayout* GroupC1Layout;
123 QGridLayout* GroupC2Layout;
126 #endif // DIALOGBOX_CYLINDER_H