1 // GEOM GEOMGUI : GUI for Geometry component
3 // Copyright (C) 2003 OPEN CASCADE
5 // This library is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation; either
8 // version 2.1 of the License.
10 // This library is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // Lesser General Public License for more details.
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with this library; if not, write to the Free Software
17 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
23 // File : GeometryGUI_EllipseDlg.h
24 // Author : Nicolas REJNERI
28 #ifndef GEOMETRYGUI_ELLIPSE_H
29 #define GEOMETRYGUI_ELLIPSE_H
31 #include "SALOME_Selection.h"
32 #include "GEOM_ShapeTypeFilter.hxx"
33 #include "GEOM_EdgeFilter.hxx"
34 #include "GeometryGUI_SpinBox.h"
38 #include <BRepBuilderAPI_MakeEdge.hxx>
56 //=================================================================================
57 // class : GeometryGUI_EllipseDlg
59 //=================================================================================
60 class GeometryGUI_EllipseDlg : public QDialog
65 GeometryGUI_EllipseDlg( QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0 );
66 ~GeometryGUI_EllipseDlg();
70 void closeEvent( QCloseEvent* e ) ;
71 void enterEvent( QEvent* e );
72 void Init(SALOME_Selection* Sel) ;
73 void MakeEllipseSimulationAndDisplay() ;
75 GEOM::GEOM_Gen_var myGeom ; /* Current GeomI object */
76 GeometryGUI* myGeomGUI ; /* Current GeomGUI object */
77 TopoDS_Shape mySimulationTopoDs ; /* Shape used for simulation display */
78 SALOME_Selection* mySelection ; /* User shape selection */
80 gp_Pnt myPoint ; /* Central point of ellipse */
81 bool myOkPoint ; /* true when myPoint is defined */
83 gp_Dir myDir ; /* to set normal axis of ellipse */
84 bool myOkDir ; /* true when myPoint is defined */
86 Standard_Real myMajorRadius ;
87 Standard_Real myMinorRadius ;
89 int myConstructorId ; /* Current constructor id = radio button id */
90 QLineEdit* myEditCurrentArgument; /* Current LineEdit */
92 Handle(GEOM_ShapeTypeFilter) myVertexFilter; /* filter for selection */
93 Handle(GEOM_EdgeFilter) myEdgeFilter; /* filter for selection */
95 QButtonGroup* GroupConstructors;
96 QRadioButton* Constructor1;
97 QGroupBox* GroupButtons;
98 QPushButton* buttonApply;
99 QPushButton* buttonCancel;
100 QPushButton* buttonOk;
102 QLineEdit* LineEditC1A1;
103 QLineEdit* LineEditC1A2;
104 QLabel* TextLabelC1A1;
105 QLabel* TextLabelC1A4;
106 QLabel* TextLabelC1A3;
107 QLabel* TextLabelC1A2;
108 QPushButton* SelectButtonC1A1;
109 QPushButton* SelectButtonC1A2;
110 GeometryGUI_SpinBox* SpinBox_C1A3;
111 GeometryGUI_SpinBox* SpinBox_C1A4;
115 void ConstructorsClicked(int constructorId);
117 void ClickOnCancel();
119 void SetEditCurrentArgument() ;
120 void SelectionIntoArgument() ;
121 void LineEditReturnPressed() ;
122 void DeactivateActiveDialog() ;
123 void ActivateThisDialog() ;
124 void ValueChangedInSpinBox(double newValue) ;
127 QGridLayout* GeometryGUI_EllipseDlgLayout;
128 QGridLayout* GroupConstructorsLayout;
129 QGridLayout* GroupButtonsLayout;
130 QGridLayout* GroupC1Layout;
133 #endif // GEOMETRYGUI_ELLIPSE_H