diff options
author | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2009-05-08 16:46:44 (GMT) |
---|---|---|
committer | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2009-05-11 14:52:04 (GMT) |
commit | 81a64345258f2f2ad5cf77355f7ecbd3ebad9734 (patch) | |
tree | 6fa024d2cadedae9ecd4e1718f704281112a78b5 /src/gui/kernel/qevent.h | |
parent | 0edf9fc7ede35995ec37197b5fb5ef92a4ccf60f (diff) | |
download | Qt-81a64345258f2f2ad5cf77355f7ecbd3ebad9734.zip Qt-81a64345258f2f2ad5cf77355f7ecbd3ebad9734.tar.gz Qt-81a64345258f2f2ad5cf77355f7ecbd3ebad9734.tar.bz2 |
Improved gesture propagation.
Each gesture can now be accepted separately and not accepted gestures
will be propagated to parent widget that are subscribed to them.
Added an internal flag to specify that gesture is a "singleshot" - aka
if the gesture is not continious and will not have a GestureStarted
state, but only GestureFinished.
Asynchronous gestures still need to fixed, as well as QGraphicsView.
Diffstat (limited to 'src/gui/kernel/qevent.h')
-rw-r--r-- | src/gui/kernel/qevent.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h index 666cd3f..ea4f577 100644 --- a/src/gui/kernel/qevent.h +++ b/src/gui/kernel/qevent.h @@ -716,7 +716,7 @@ private: class Q_GUI_EXPORT QGestureEvent : public QEvent { public: - QGestureEvent(const QList<QGesture*> &gestures, + QGestureEvent(const QSet<QGesture*> &gestures, const QSet<QString> &cancelledGestures = QSet<QString>()); ~QGestureEvent(); @@ -731,6 +731,15 @@ public: QSet<QString> cancelledGestures() const; + void acceptAll(); +#ifndef Q_NO_USING_KEYWORD + using QEvent::accept; +#else + inline void accept() { QEvent::accept(); } +#endif + void accept(Qt::GestureType type); + void accept(const QString &type); + protected: QHash<QString, QGesture*> m_gestures; QSet<QString> m_cancelledGestures; |