00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef QoccCmdLine2Pt_H
00026 #define QoccCmdLine2Pt_H
00027
00028 #include <QtCore/QObject>
00029 #include "qocc.h"
00030 #include "qoccapplication.h"
00031 #include "qocccommand.h"
00032
00033 class QOCC_DECLSPEC QoccDlgLine2Pt : public QObject
00034 {
00035 Q_OBJECT
00036
00037 public:
00038
00039 QoccDlgLine2Pt( );
00040 ~QoccDlgLine2Pt( );
00041
00042 private:
00043
00044
00045 };
00046
00047 class QOCC_DECLSPEC QoccCmdLine2Pt : public QoccCommand
00048 {
00049 Q_OBJECT
00050
00051 public:
00052 enum LineParameter
00053 {
00054 Point1, Point2, Done
00055 };
00056
00057 public:
00058
00059 QoccCmdLine2Pt( QAction* startingAction = NULL, QWidget* parent = NULL );
00060 ~QoccCmdLine2Pt( );
00061
00062 virtual void clickEvent(Qocc3dWidget* widget, QMouseEvent* e);
00063 virtual void moveEvent(Qocc3dWidget* widget, QMouseEvent* e);
00064
00065 protected:
00066
00067 QoccDocument* myDocument;
00068 Handle(GEOM_Object) myStart;
00069 Handle(GEOM_Object) myEnd;
00070 Handle(GEOM_Object) myLine;
00071 LineParameter myParameter;
00072
00073 gp_Pnt myCurrentPoint;
00074 gp_Pnt myStartPoint;
00075
00076 };
00077
00078
00079 #endif // QoccCmdLine2Pt_H