1 // File : GeometryGUI_SphereDlg.h
3 // Author : Lucien PIGNOLONI
5 // Module : GeometryGUI
6 // Copyright : OPEN CASCADE
9 #ifndef DIALOGBOX_SPHERE_H
10 #define DIALOGBOX_SPHERE_H
12 #include "SALOME_Selection.h"
13 #include "GEOM_ShapeTypeFilter.hxx"
16 #include <TopoDS_Shape.hxx>
17 #include <BRepPrimAPI_MakeSphere.hxx>
21 #include <qvalidator.h>
32 class GeometryGUI_SpinBox;
37 //=================================================================================
38 // class : GeometryGUI_SphereDlg
40 //=================================================================================
41 class GeometryGUI_SphereDlg : public QDialog
46 GeometryGUI_SphereDlg( QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0 );
47 ~GeometryGUI_SphereDlg();
51 GEOM::GEOM_Gen_var myGeom ; /* Current Geom object */
52 GeometryGUI* myGeomGUI ; /* Current GeomGUI object */
53 TopoDS_Shape mySimulationTopoDs; /* Shape used for simulation display */
54 SALOME_Selection* mySelection ; /* User shape selection */
55 gp_Pnt myPoint1 ; /* Points containing the vector */
57 Standard_Real myRadius ;
59 QDoubleValidator *myVa ; /* Double validator for numeric input myRadius in LineEditC1A2 */
60 QDoubleValidator *myVb ; /* Double validator for numeric input myRadius in LineEditC2A1 */
62 bool myOkPoint1 ; /* Are true when myPoint is defined */
63 QWidget* myEditCurrentArgument; /* Current LineEdit or SpinBox */
64 int myConstructorId ; /* Current constructor id = radio button id */
65 Handle(GEOM_ShapeTypeFilter) myVertexFilter; /* Filter selection */
67 void closeEvent( QCloseEvent* e ) ;
68 void enterEvent( QEvent* e);
69 void Init( SALOME_Selection* Sel ) ;
71 QGroupBox* GroupButtons;
72 QPushButton* buttonApply;
73 QPushButton* buttonOk;
74 QPushButton* buttonCancel;
75 QButtonGroup* GroupConstructors;
76 QRadioButton* Constructor1;
77 QRadioButton* Constructor2;
78 QGroupBox* GroupConstructor1;
79 QLineEdit* LineEditC1A1;
80 QPushButton* SelectButtonC1A1;
81 QLabel* TextLabelC1A1;
82 QLabel* TextLabelC1A2;
83 // QLineEdit* LineEditC1A2;
84 QGroupBox* GroupConstructor2;
85 // QLineEdit* LineEditC2A1;
86 GeometryGUI_SpinBox* SpinBox_C1A2 ;
87 GeometryGUI_SpinBox* SpinBox_C2A1 ;
88 QLabel* TextLabelC2A1;
92 void ConstructorsClicked(int constructorId);
96 void LineEditReturnPressed() ;
97 void SetEditCurrentArgument() ;
98 void SelectionIntoArgument() ;
99 void DeactivateActiveDialog() ;
100 void ActivateThisDialog() ;
101 void ValueChangedInSpinBox( double newValue ) ;
104 QGridLayout* GeometryGUI_SphereDlgLayout;
105 QGridLayout* GroupButtonsLayout;
106 QGridLayout* GroupConstructorsLayout;
107 QGridLayout* GroupConstructor1Layout;
108 QGridLayout* GroupConstructor2Layout;
111 #endif // DIALOGBOX_SPHERE_H