Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef ENTITYGUI_3DSKETCHERDLG_H
00025 #define ENTITYGUI_3DSKETCHERDLG_H
00026
00027 #include <GEOMBase_Skeleton.h>
00028
00029 class QButtonGroup;
00030 class QDoubleSpinBox;
00031 class EntityGUI_3Spin;
00032 class DlgRef_3Radio;
00033
00034 #ifndef COORD_MIN
00035 # define COORD_MIN -1e+15
00036 # define COORD_MAX +1e+15
00037 # define MAX_NUMBER 100000
00038 # define DBL_DIGITS_DISPLAY 16
00039 #endif // COORD_MIN
00040
00041
00042
00043
00044
00045 class EntityGUI_3DSketcherDlg : public GEOMBase_Skeleton
00046 {
00047 Q_OBJECT
00048
00049 struct XYZ
00050 {
00051 XYZ() { x = y = z = 0.0; xt = yt = zt = "0.0"; }
00052 double x, y, z;
00053 QString xt, yt, zt;
00054 };
00055 typedef QList<XYZ> XYZList;
00056
00057 public:
00058 EntityGUI_3DSketcherDlg( GeometryGUI*, QWidget* = 0, bool = false, Qt::WindowFlags = 0, const double = 2. );
00059 ~EntityGUI_3DSketcherDlg();
00060
00061 protected:
00062
00063
00064 virtual GEOM::GEOM_IOperations_ptr createOperation();
00065 virtual bool isValid( QString& );
00066 virtual bool execute( ObjectList& );
00067
00068 private:
00069 void Init();
00070 void enterEvent( QEvent* );
00071
00072 virtual void displayPreview( GEOM::GEOM_Object_ptr,
00073 const bool = false,
00074 const bool = false,
00075 const bool = true,
00076 const double = -1,
00077 const int = -1,
00078 const int = -1);
00079
00080 bool createShapes( GEOM::GEOM_Object_ptr,
00081 TopoDS_Shape&,
00082 TopoDS_Shape& );
00083
00084 XYZ getLastPoint() const;
00085 XYZ getCurrentPoint() const;
00086
00087 private:
00088 XYZList myPointsList;
00089 XYZList myRedoList;
00090
00091 EntityGUI_3Spin* Group3Spin;
00092 DlgRef_3Radio* GroupType;
00093 QButtonGroup* myTypeGroup;
00094
00095 int myMode;
00096 bool myOK;
00097 double myLineWidth;
00098 GeometryGUI* myGeometryGUI;
00099
00100 private slots:
00101 void ClickOnOk();
00102 void ClickOnAddPoint();
00103 bool ClickOnApply();
00104
00105 void UpdateButtonsState();
00106
00107 void ClickOnUndo();
00108 void ClickOnRedo();
00109
00110 void SelectionIntoArgument();
00111 void DeactivateActiveDialog();
00112 void ActivateThisDialog();
00113 void TypeClicked( int );
00114 void ValueChangedInSpinBox( double );
00115 void SetDoubleSpinBoxStep( double );
00116 };
00117
00118 #endif // ENTITYGUI_SKETCHERDLG_H