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.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // File : EntityGUI_3DSketcherDlg.h
26 #ifndef ENTITYGUI_3DSKETCHERDLG_H
27 #define ENTITYGUI_3DSKETCHERDLG_H
29 #include <GEOMBase_Skeleton.h>
33 class EntityGUI_3Spin;
37 # define COORD_MIN -1e+15
38 # define COORD_MAX +1e+15
39 # define MAX_NUMBER 100000
40 # define DBL_DIGITS_DISPLAY 16
43 //=================================================================================
44 // class : EntityGUI_Dlg
46 //=================================================================================
47 class EntityGUI_3DSketcherDlg : public GEOMBase_Skeleton
53 XYZ() { x = y = z = 0.0; xt = yt = zt = "0.0"; }
57 typedef QList<XYZ> XYZList;
60 EntityGUI_3DSketcherDlg( GeometryGUI*, QWidget* = 0, bool = false, Qt::WindowFlags = 0, const double = 2. );
61 ~EntityGUI_3DSketcherDlg();
64 void initSpinBox( QDoubleSpinBox*,
65 double, double, double = 0.1,
68 // redefined from GEOMBase_Helper
69 virtual GEOM::GEOM_IOperations_ptr createOperation();
70 virtual bool isValid( QString& );
71 virtual bool execute( ObjectList& );
75 void enterEvent( QEvent* );
77 virtual void displayPreview( GEOM::GEOM_Object_ptr,
85 bool createShapes( GEOM::GEOM_Object_ptr,
89 XYZ getLastPoint() const;
90 XYZ getCurrentPoint() const;
96 EntityGUI_3Spin* Group3Spin;
97 DlgRef_3Radio* GroupType;
98 QButtonGroup* myTypeGroup;
103 GeometryGUI* myGeometryGUI;
107 void ClickOnAddPoint();
109 // bool isSameAsPrevious();
110 void UpdateButtonsState();
115 void SelectionIntoArgument();
116 void DeactivateActiveDialog();
117 void ActivateThisDialog();
118 void TypeClicked( int );
119 void ValueChangedInSpinBox( double );
120 void SetDoubleSpinBoxStep( double );
123 #endif // ENTITYGUI_SKETCHERDLG_H