diff options
author | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2009-10-22 22:41:43 +0200 |
---|---|---|
committer | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2009-10-26 11:42:24 +0100 |
commit | dc54674e9f8998b4aee3a58d06f6b5533ccd3cfe (patch) | |
tree | b561397b0103218473bf6d6864e4b143deabcf4f /src/gui/kernel/qevent.cpp | |
parent | 706c3f846b97c74c5e15395b6e2d306c522ba769 (diff) | |
download | qt4-tools-dc54674e9f8998b4aee3a58d06f6b5533ccd3cfe.tar.gz |
Implemented QGestureEvent::activeGestures and canceledGestures.
Reviewed-by: Thomas Zander
Diffstat (limited to 'src/gui/kernel/qevent.cpp')
-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 065bd095a9..74dfa534a4 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; } /*! |