From bcd88d8e9984bff664740aae3cff708a069dbbdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Tue, 7 Jan 2014 12:54:03 +0100 Subject: 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 --- src/gui/kernel/qwindowsysteminterface.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/gui/kernel/qwindowsysteminterface.h') 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); -- cgit v1.2.3