karbon
vshapetool.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __VSHAPETOOL_H__
00021 #define __VSHAPETOOL_H__
00022
00023 #include <qstring.h>
00024
00025 #include <KoPoint.h>
00026
00027 #include "vtool.h"
00028
00029
00030 class VPath;
00031 class VCursor;
00032
00033 class VShapeTool : public VTool
00034 {
00035 public:
00036 VShapeTool( KarbonView *view, const char *name, bool polar = false );
00037
00038 virtual enumToolType toolType() { return TOOL_SHAPE; }
00039 virtual QString statusText();
00040 virtual QString contextHelp();
00041
00042 virtual void activate();
00043
00044 protected:
00045 virtual void draw();
00046
00047 virtual void mouseButtonPress();
00048 virtual void mouseButtonRelease();
00049 virtual void mouseDrag();
00050 virtual void mouseDragRelease();
00051 virtual void mouseDragShiftPressed();
00052 virtual void mouseDragCtrlPressed();
00053 virtual void mouseDragShiftReleased();
00054 virtual void mouseDragCtrlReleased();
00055
00056 virtual void cancel();
00057
00058
00059 virtual ~VShapeTool();
00060
00061 virtual VPath* shape( bool interactive = false ) const = 0;
00062
00066 KoPoint m_p;
00067 double m_d1;
00068 double m_d2;
00069
00070 private:
00071 void recalc();
00072
00074 bool m_isPolar;
00075
00077 bool m_isSquare;
00078 bool m_isCentered;
00079
00080 QCursor* m_cursor;
00081 };
00082
00083 #endif
|