kivio
tool_text.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef TOOL_TEXT_H
00021 #define TOOL_TEXT_H
00022
00023 #include "kivio_mousetool.h"
00024 #include <koffice_export.h>
00025 class QMouseEvent;
00026 class QCursor;
00027
00028 namespace Kivio {
00029 class MouseToolAction;
00030 }
00031
00032 class KivioView;
00033 class KivioPage;
00034 class KoPoint;
00035
00036 class KIVIO_EXPORT TextTool : public Kivio::MouseTool
00037 {
00038 Q_OBJECT
00039 public:
00040 TextTool( KivioView* parent );
00041 ~TextTool();
00042
00043 virtual bool processEvent(QEvent* e);
00044
00045 void text(QRect);
00046
00047 public slots:
00048 virtual void setActivated(bool a);
00049 virtual void applyToolAction(QPtrList<KivioStencil>* stencils);
00050 virtual void applyToolAction(KivioStencil* stencil, const KoPoint& pos);
00051
00052 protected slots:
00053 void makePermanent();
00054
00055 signals:
00056 void operationDone();
00057
00058 protected:
00059 void mousePress(QMouseEvent *);
00060 void mouseMove(QMouseEvent *);
00061 void mouseRelease(QMouseEvent *);
00062
00063 bool startRubberBanding(QMouseEvent*);
00064 void continueRubberBanding(QMouseEvent *);
00065 void endRubberBanding(QMouseEvent *);
00066
00067
00068
00069 QPoint m_startPoint, m_releasePoint;
00070
00071
00072 enum
00073 {
00074 stmNone,
00075 stmDrawRubber
00076 };
00077
00078 private:
00079
00080 int m_mode;
00081 QCursor* m_pTextCursor;
00082 Kivio::MouseToolAction* m_textAction;
00083 bool m_permanent;
00084 };
00085
00086 #endif
00087
00088
|