diff options
Diffstat (limited to 'src/gui/kernel/qgesturemanager_p.h')
-rw-r--r-- | src/gui/kernel/qgesturemanager_p.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/gui/kernel/qgesturemanager_p.h b/src/gui/kernel/qgesturemanager_p.h index c61819f..f0e7225 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, + QEvent *event); private: QMultiMap<Qt::GestureType, QGestureRecognizer *> recognizers; @@ -109,15 +114,20 @@ private: } }; - QMap<ObjectGesture, QWeakPointer<QGesture> > objectGestures; + QMap<ObjectGesture, QGesture *> objectGestures; QMap<QGesture *, QGestureRecognizer *> gestureToRecognizer; + QHash<QGesture *, QObject *> gestureOwners; - QHash<QGesture *, QObject *> gestureTargets; + QHash<QGesture *, QWidget *> gestureTargets; int lastCustomGestureId; QGesture *getState(QObject *widget, Qt::GestureType gesture); - void deliverEvents(const QSet<QGesture *> &gestures, QObject *lastReceiver); + void deliverEvents(const QSet<QGesture *> &gestures, + QSet<QGesture *> *undeliveredGestures); + void getGestureTargets(const QSet<QGesture*> &gestures, + QMap<QWidget *, QList<QGesture *> > *conflicts, + QMap<QWidget *, QList<QGesture *> > *normal); }; QT_END_NAMESPACE |