diff options
author | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2009-10-22 20:41:43 (GMT) |
---|---|---|
committer | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2009-10-26 10:42:24 (GMT) |
commit | dc54674e9f8998b4aee3a58d06f6b5533ccd3cfe (patch) | |
tree | b561397b0103218473bf6d6864e4b143deabcf4f /src | |
parent | 706c3f846b97c74c5e15395b6e2d306c522ba769 (diff) | |
download | Qt-dc54674e9f8998b4aee3a58d06f6b5533ccd3cfe.zip Qt-dc54674e9f8998b4aee3a58d06f6b5533ccd3cfe.tar.gz Qt-dc54674e9f8998b4aee3a58d06f6b5533ccd3cfe.tar.bz2 |
Implemented QGestureEvent::activeGestures and canceledGestures.
Reviewed-by: Thomas Zander
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/kernel/qevent.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index 065bd09..74dfa53 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -4262,7 +4262,12 @@ QGesture *QGestureEvent::gesture(Qt::GestureType type) const */ QList<QGesture *> QGestureEvent::activeGestures() const { - return d_func()->gestures; + QList<QGesture *> gestures; + foreach (QGesture *gesture, d_func()->gestures) { + if (gesture->state() != Qt::GestureCanceled) + gestures.append(gesture); + } + return gestures; } /*! @@ -4270,7 +4275,12 @@ QList<QGesture *> QGestureEvent::activeGestures() const */ QList<QGesture *> QGestureEvent::canceledGestures() const { - return d_func()->gestures; + QList<QGesture *> gestures; + foreach (QGesture *gesture, d_func()->gestures) { + if (gesture->state() == Qt::GestureCanceled) + gestures.append(gesture); + } + return gestures; } /*! |