summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qevent.h
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@digia.com>2014-12-04 17:03:35 +0100
committerShawn Rutledge <shawn.rutledge@digia.com>2015-01-13 13:14:57 +0100
commit74443d7bbb319e949928dd081fde04bccb5f7845 (patch)
treed970ede6dba04cc4c0baab506d5e9bbf95358812 /src/gui/kernel/qevent.h
parent9d5b1fd151581209a36844da4fe89ccef5791115 (diff)
Add QWheelEvent::source
This is analogous to 0a92295ca829a62125c9f122fd3daec991993855 which added QMouseEvent::source. For now, we say that a wheel event is synthetic when it comes from a trackpad or other device that provides scrolling by some means other than an actual wheel. Change-Id: I0452ca2080b551b18b9c2f6e42db925d14ae339e Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Diffstat (limited to 'src/gui/kernel/qevent.h')
-rw-r--r--src/gui/kernel/qevent.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h
index 0b6d96a590..35a8884865 100644
--- a/src/gui/kernel/qevent.h
+++ b/src/gui/kernel/qevent.h
@@ -176,7 +176,9 @@ public:
QWheelEvent(const QPointF &pos, const QPointF& globalPos,
QPoint pixelDelta, QPoint angleDelta, int qt4Delta, Qt::Orientation qt4Orientation,
Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Qt::ScrollPhase phase);
-
+ QWheelEvent(const QPointF &pos, const QPointF &globalPos, QPoint pixelDelta, QPoint angleDelta,
+ int qt4Delta, Qt::Orientation qt4Orientation, Qt::MouseButtons buttons,
+ Qt::KeyboardModifiers modifiers, Qt::ScrollPhase phase, Qt::MouseEventSource source);
~QWheelEvent();
@@ -201,6 +203,8 @@ public:
inline Qt::ScrollPhase phase() const { return Qt::ScrollPhase(ph); }
+ Qt::MouseEventSource source() const { return Qt::MouseEventSource(src); }
+
protected:
QPointF p;
QPointF g;
@@ -210,7 +214,8 @@ protected:
Qt::Orientation qt4O;
Qt::MouseButtons mouseState;
uint ph : 2;
- int reserved : 30;
+ uint src: 2;
+ int reserved : 28;
};
#endif