libs/flake
KoPointerEvent.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
00022
00023 #ifndef KOPOINTEREVENT_H
00024 #define KOPOINTEREVENT_H
00025
00026 #include <QInputEvent>
00027
00028 class QTabletEvent;
00029 class QMouseEvent;
00030 class QWheelEvent;
00031 class KoDeviceEvent;
00032
00033 #include "flake_export.h"
00034
00042 class FLAKE_EXPORT KoPointerEvent
00043 {
00044 public:
00051 KoPointerEvent(QMouseEvent *ev, const QPointF &pnt);
00052
00059 KoPointerEvent(QTabletEvent *ev, const QPointF &pnt);
00060
00067 KoPointerEvent(QWheelEvent *ev, const QPointF &pnt);
00068
00069 KoPointerEvent(KoDeviceEvent * ev, int x, int y, int z = 0, int rx = 0, int ry = 0, int rz = 0);
00070
00071 ~KoPointerEvent();
00072
00078 inline void accept() {
00079 m_event->accept();
00080 }
00081
00087 inline void ignore() {
00088 m_event->ignore();
00089 }
00090
00095 Qt::KeyboardModifiers modifiers() const {
00096 return m_event->modifiers();
00097 }
00098
00100 inline bool isAccepted() const {
00101 return m_event->isAccepted();
00102 }
00103
00105 inline bool spontaneous() const {
00106 return m_event->spontaneous();
00107 }
00108
00110 Qt::MouseButton button() const;
00111
00113 Qt::MouseButtons buttons() const;
00114
00116 const QPoint & globalPos();
00117
00119 const QPoint & pos() const;
00120
00126 qreal pressure() const;
00127
00129 qreal rotation() const;
00130
00138 qreal tangentialPressure() const;
00139
00144 int x() const;
00145
00152 int xTilt() const;
00153
00158 int y() const;
00159
00166 int yTilt() const;
00167
00173 int z() const;
00174
00180 int delta() const;
00181
00186 int rotationX() const;
00187
00192 int rotationY() const;
00193
00198 int rotationZ() const;
00199
00203 Qt::Orientation orientation() const;
00204
00206 const QPointF point;
00207
00208 protected:
00209 friend class KoToolProxy;
00211 void setTabletButton(Qt::MouseButton button);
00212 private:
00213
00214 QInputEvent * m_event;
00215
00216 class Private;
00217 Private * const d;
00218 };
00219
00220 #endif
00221
|