1 // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 // GEOM GEOMGUI : GUI for Geometry component
21 // File : EntityGUI_3DSketcherDlg.h
24 #ifndef ENTITYGUI_3DSKETCHERDLG_H
25 #define ENTITYGUI_3DSKETCHERDLG_H
27 #include <GEOMBase_Skeleton.h>
31 class EntityGUI_3Spin;
32 class EntityGUI_Angles;
33 class EntityGUI_Controls;
37 #include <AIS_ListOfInteractive.hxx>
40 # define COORD_MIN -1e+15
41 # define COORD_MAX +1e+15
42 # define MAX_NUMBER 100000
43 # define DBL_DIGITS_DISPLAY 16
46 //=================================================================================
47 // class : EntityGUI_Dlg
49 //=================================================================================
50 class EntityGUI_3DSketcherDlg : public GEOMBase_Skeleton
56 XYZ() { x = y = z = 0.0; xt = yt = zt = "0.0"; }
60 typedef QList<XYZ> XYZList;
63 EntityGUI_3DSketcherDlg( GeometryGUI*, QWidget* = 0, bool = false, Qt::WindowFlags = 0, const double = 2. );
64 ~EntityGUI_3DSketcherDlg();
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 void displayTrihedron( int );
87 void displayAngle( double, double, double, int, bool store = false );
88 void displayLength( double theLength = -1.0, bool store = false );
90 bool createShapes( GEOM::GEOM_Object_ptr,
94 XYZ getLastPoint() const;
95 XYZ getPenultimatePoint() const;
96 XYZ getCurrentPoint() const;
101 AIS_ListOfInteractive myLengthIORedoList;
102 AIS_ListOfInteractive myAngleIORedoList;
104 std::list<int> myPrsTypeList;
105 std::list<int> myPrsTypeRedoList;
107 EntityGUI_3Spin* Group3Spin;
108 EntityGUI_Angles* GroupAngles;
109 EntityGUI_Controls* GroupControls;
110 DlgRef_3Radio* GroupType;
111 QButtonGroup* myTypeGroup;
116 bool isLengthVisible;
120 GeometryGUI* myGeometryGUI;
121 SOCC_Prs* myAnglePrs;
122 SOCC_Prs* myLengthPrs;
126 void ClickOnAddPoint();
128 // bool isSameAsPrevious();
129 void UpdateButtonsState();
134 void SelectionIntoArgument();
135 void DeactivateActiveDialog();
136 void ActivateThisDialog();
137 void TypeClicked( int );
138 void ValueChangedInSpinBox( double );
139 void ButtonClicked( bool );
140 void BoxChecked ( bool );
141 void SetDoubleSpinBoxStep( double );
144 #endif // ENTITYGUI_SKETCHERDLG_H