diff options
author | Morten Johan Sørvig <morten.sorvig@digia.com> | 2014-01-07 12:54:03 +0100 |
---|---|---|
committer | Jan Arve Sæther <jan-arve.saether@theqtcompany.com> | 2016-03-06 19:39:42 +0000 |
commit | bcd88d8e9984bff664740aae3cff708a069dbbdd (patch) | |
tree | 135211722f685ebd1fca8c74a450a0109c23e60d /src/gui/kernel/qwindowsysteminterface.h | |
parent | d4b6ed3c18ecad9de1da182e6c1e3fc4eced2e49 (diff) |
Add QWheelEvent::inverted()
Some consumers of wheel events need to know if the
scrolling direction is inverted in order to provide
consistent behavior.
For example, the scrolling direction of a horizontal
slider should not change when the user toggles the
"natural scrolling" setting on OS X. In this case
the inverted bit will change state and the slider
can compensate.
This change adds a bit to QWheelEvent and sets it
on OS X.
Task-number: QTBUG-35972
Change-Id: I221435dea45d436d570b113bd0e24ee6f6832211
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Diffstat (limited to 'src/gui/kernel/qwindowsysteminterface.h')
-rw-r--r-- | src/gui/kernel/qwindowsysteminterface.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/kernel/qwindowsysteminterface.h b/src/gui/kernel/qwindowsysteminterface.h index 66a4afb085..eff3986788 100644 --- a/src/gui/kernel/qwindowsysteminterface.h +++ b/src/gui/kernel/qwindowsysteminterface.h @@ -109,7 +109,8 @@ public: QPoint pixelDelta, QPoint angleDelta, Qt::KeyboardModifiers mods = Qt::NoModifier, Qt::ScrollPhase phase = Qt::NoScrollPhase, - Qt::MouseEventSource source = Qt::MouseEventNotSynthesized); + Qt::MouseEventSource source = Qt::MouseEventNotSynthesized, + bool inverted = false); // Wheel event compatibility functions. Will be removed: do not use. static void handleWheelEvent(QWindow *w, const QPointF & local, const QPointF & global, int d, Qt::Orientation o, Qt::KeyboardModifiers mods = Qt::NoModifier); |