diff options
author | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2009-10-13 08:11:54 (GMT) |
---|---|---|
committer | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2009-10-22 14:59:18 (GMT) |
commit | d1a60dcbddbae46aaea655bb55c0c8fd46f38b2c (patch) | |
tree | 7da27d0d94a66a7806acffc57211c8d8556b5e5f /src/gui/kernel/qgesturemanager_p.h | |
parent | 1b154ddf00473700d697411304804ac065ef32ac (diff) | |
download | Qt-d1a60dcbddbae46aaea655bb55c0c8fd46f38b2c.zip Qt-d1a60dcbddbae46aaea655bb55c0c8fd46f38b2c.tar.gz Qt-d1a60dcbddbae46aaea655bb55c0c8fd46f38b2c.tar.bz2 |
Improved gesture event filtering inside QGraphicsView for QGraphicObjects
Reviewed-by: trustme
Diffstat (limited to 'src/gui/kernel/qgesturemanager_p.h')
-rw-r--r-- | src/gui/kernel/qgesturemanager_p.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gui/kernel/qgesturemanager_p.h b/src/gui/kernel/qgesturemanager_p.h index c61819f..5fc02ab 100644 --- a/src/gui/kernel/qgesturemanager_p.h +++ b/src/gui/kernel/qgesturemanager_p.h @@ -61,6 +61,7 @@ QT_BEGIN_NAMESPACE class QBasicTimer; +class QGraphicsObject; class QGestureManager : public QObject { Q_OBJECT @@ -71,13 +72,17 @@ public: Qt::GestureType registerGestureRecognizer(QGestureRecognizer *recognizer); void unregisterGestureRecognizer(Qt::GestureType type); - bool filterEvent(QObject *receiver, QEvent *event); + bool filterEvent(QWidget *receiver, QEvent *event); + bool filterEvent(QGesture *receiver, QEvent *event); + bool filterEvent(QGraphicsObject *receiver, QEvent *event); // declared in qapplication.cpp static QGestureManager* instance(); protected: void timerEvent(QTimerEvent *event); + bool filterEventThroughContexts(const QMap<QObject *, Qt::GestureType> &contexts, + QObject *receiver, QEvent *event); private: QMultiMap<Qt::GestureType, QGestureRecognizer *> recognizers; @@ -117,7 +122,8 @@ private: int lastCustomGestureId; QGesture *getState(QObject *widget, Qt::GestureType gesture); - void deliverEvents(const QSet<QGesture *> &gestures, QObject *lastReceiver); + void deliverEvents(const QSet<QGesture *> &gestures, QObject *lastReceiver, + QSet<QGesture *> *undeliveredGestures); }; QT_END_NAMESPACE |