summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwindowsysteminterface.h
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@digia.com>2013-08-05 13:34:33 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-08 15:09:40 +0200
commit9dfe4b0e683d706400a2e929a8de97df64ca172e (patch)
treebbcd8ce3e6a9ffdffeef0be9a6e9d35dd7412e79 /src/gui/kernel/qwindowsysteminterface.h
parentd916ed12b3ce36fce04f107751423f9986be52f0 (diff)
Introduce QWheelEvent::Phase (Begin, Changed, Ended)
Some platforms (read: OS X) send wheel events without delta to indicate that scrolling is about to start or has ended. Currently, Qt simply ignores wheel events that have no delta. This change introduces a new QWheelEvent attribute that specifies the phase, and makes it possible to receive the special wheel events in started/ended phases. These events are required for implementing correctly behaving transient scrollbars. Change-Id: Ib8ce0d9ce9be63b2ad60aa7b0aaa1f12ef6cad09 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'src/gui/kernel/qwindowsysteminterface.h')
-rw-r--r--src/gui/kernel/qwindowsysteminterface.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/kernel/qwindowsysteminterface.h b/src/gui/kernel/qwindowsysteminterface.h
index b0327701bb..bac5a570a9 100644
--- a/src/gui/kernel/qwindowsysteminterface.h
+++ b/src/gui/kernel/qwindowsysteminterface.h
@@ -61,6 +61,7 @@
#include <QtGui/QTouchEvent>
#include <QtCore/QEventLoop>
#include <QtGui/QVector2D>
+#include <QtGui/QWheelEvent>
QT_BEGIN_NAMESPACE
@@ -103,8 +104,8 @@ public:
quint32 nativeModifiers,
const QString& text = QString(), bool autorep = false,
ushort count = 1);
- static void handleWheelEvent(QWindow *w, const QPointF & local, const QPointF & global, QPoint pixelDelta, QPoint angleDelta, Qt::KeyboardModifiers mods = Qt::NoModifier);
- static void handleWheelEvent(QWindow *w, ulong timestamp, const QPointF & local, const QPointF & global, QPoint pixelDelta, QPoint angleDelta, Qt::KeyboardModifiers mods = Qt::NoModifier);
+ static void handleWheelEvent(QWindow *w, const QPointF & local, const QPointF & global, QPoint pixelDelta, QPoint angleDelta, Qt::KeyboardModifiers mods = Qt::NoModifier, QWheelEvent::Phase phase = QWheelEvent::Changed);
+ static void handleWheelEvent(QWindow *w, ulong timestamp, const QPointF & local, const QPointF & global, QPoint pixelDelta, QPoint angleDelta, Qt::KeyboardModifiers mods = Qt::NoModifier, QWheelEvent::Phase phase = QWheelEvent::Changed);
// 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);