1 // GEOM GEOMGUI : GUI for Geometry component
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : GeometryGUI_SphereDlg.h
25 // Author : Lucien PIGNOLONI
29 #ifndef DIALOGBOX_SPHERE_H
30 #define DIALOGBOX_SPHERE_H
32 #include "SALOME_Selection.h"
33 #include "GEOM_ShapeTypeFilter.hxx"
36 #include <TopoDS_Shape.hxx>
37 #include <BRepPrimAPI_MakeSphere.hxx>
41 #include <qvalidator.h>
52 class GeometryGUI_SpinBox;
57 //=================================================================================
58 // class : GeometryGUI_SphereDlg
60 //=================================================================================
61 class GeometryGUI_SphereDlg : public QDialog
66 GeometryGUI_SphereDlg( QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0 );
67 ~GeometryGUI_SphereDlg();
71 GEOM::GEOM_Gen_var myGeom ; /* Current Geom object */
72 GeometryGUI* myGeomGUI ; /* Current GeomGUI object */
73 TopoDS_Shape mySimulationTopoDs; /* Shape used for simulation display */
74 SALOME_Selection* mySelection ; /* User shape selection */
75 gp_Pnt myPoint1 ; /* Points containing the vector */
77 Standard_Real myRadius ;
79 QDoubleValidator *myVa ; /* Double validator for numeric input myRadius in LineEditC1A2 */
80 QDoubleValidator *myVb ; /* Double validator for numeric input myRadius in LineEditC2A1 */
82 bool myOkPoint1 ; /* Are true when myPoint is defined */
83 QWidget* myEditCurrentArgument; /* Current LineEdit or SpinBox */
84 int myConstructorId ; /* Current constructor id = radio button id */
85 Handle(GEOM_ShapeTypeFilter) myVertexFilter; /* Filter selection */
87 void closeEvent( QCloseEvent* e ) ;
88 void enterEvent( QEvent* e);
89 void Init( SALOME_Selection* Sel ) ;
91 QGroupBox* GroupButtons;
92 QPushButton* buttonApply;
93 QPushButton* buttonOk;
94 QPushButton* buttonCancel;
95 QButtonGroup* GroupConstructors;
96 QRadioButton* Constructor1;
97 QRadioButton* Constructor2;
98 QGroupBox* GroupConstructor1;
99 QLineEdit* LineEditC1A1;
100 QPushButton* SelectButtonC1A1;
101 QLabel* TextLabelC1A1;
102 QLabel* TextLabelC1A2;
103 // QLineEdit* LineEditC1A2;
104 QGroupBox* GroupConstructor2;
105 // QLineEdit* LineEditC2A1;
106 GeometryGUI_SpinBox* SpinBox_C1A2 ;
107 GeometryGUI_SpinBox* SpinBox_C2A1 ;
108 QLabel* TextLabelC2A1;
112 void ConstructorsClicked(int constructorId);
114 void ClickOnCancel();
116 void LineEditReturnPressed() ;
117 void SetEditCurrentArgument() ;
118 void SelectionIntoArgument() ;
119 void DeactivateActiveDialog() ;
120 void ActivateThisDialog() ;
121 void ValueChangedInSpinBox( double newValue ) ;
124 QGridLayout* GeometryGUI_SphereDlgLayout;
125 QGridLayout* GroupButtonsLayout;
126 QGridLayout* GroupConstructorsLayout;
127 QGridLayout* GroupConstructor1Layout;
128 QGridLayout* GroupConstructor2Layout;
131 #endif // DIALOGBOX_SPHERE_H