libs/flake
KoToolProxy.hGo 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 #ifndef _KO_TOOL_PROXY_H_
00022 #define _KO_TOOL_PROXY_H_
00023
00024 #include <KoViewConverter.h>
00025 #include "flake_export.h"
00026
00027 #include <QPainter>
00028
00029 class KAction;
00030 class QAction;
00031 class QMouseEvent;
00032 class QKeyEvent;
00033 class QWheelEvent;
00034 class QTabletEvent;
00035 class KoToolSelection;
00036 class KoTool;
00037 class KoCanvasBase;
00038 class KoCanvasController;
00039 class QInputMethodEvent;
00040
00050 class FLAKE_EXPORT KoToolProxy : public QObject
00051 {
00052 Q_OBJECT
00053 public:
00059 explicit KoToolProxy(KoCanvasBase *canvas, QObject *parent = 0);
00060 ~KoToolProxy();
00061
00063 void paint(QPainter &painter, const KoViewConverter &converter);
00065 void repaintDecorations();
00067 void tabletEvent(QTabletEvent *event, const QPointF &point);
00069 void mousePressEvent(QMouseEvent *event, const QPointF &point);
00071 void mouseDoubleClickEvent(QMouseEvent *event, const QPointF &point);
00073 void mouseMoveEvent(QMouseEvent *event, const QPointF &point);
00075 void mouseReleaseEvent(QMouseEvent *event, const QPointF &point);
00077 void keyPressEvent(QKeyEvent *event);
00079 void keyReleaseEvent(QKeyEvent *event);
00081 void wheelEvent(QWheelEvent * event, const QPointF &point);
00083 QVariant inputMethodQuery(Qt::InputMethodQuery query, const KoViewConverter &converter) const;
00085 void inputMethodEvent(QInputMethodEvent *event);
00087 QList<QAction*> popupActionList() const;
00089 void deleteSelection();
00090
00095 QHash<QString, KAction*> actions() const;
00096
00100 KoToolSelection* selection();
00101
00103 void cut();
00105 void copy() const;
00107 bool paste();
00109 QStringList supportedPasteMimeTypes() const;
00111 void setActiveTool(KoTool *tool);
00112
00113 signals:
00118 void selectionChanged(bool hasSelection);
00119
00125 void toolChanged(const QString &toolId);
00126
00127 protected:
00128 friend class KoToolManager;
00130 void setCanvasController(KoCanvasController *controller);
00131
00132 private:
00133 Q_PRIVATE_SLOT(d, void timeout())
00134 Q_PRIVATE_SLOT(d, void selectionChanged(bool))
00135
00136 class Private;
00137 Private * const d;
00138 };
00139
00140
00141 #endif // _KO_TOOL_PROXY_H_
|