summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qgesturemanager_p.h
diff options
context:
space:
mode:
authorThomas Zander <thomas.zander@trolltech.com>2009-10-21 10:40:59 (GMT)
committerThomas Zander <thomas.zander@trolltech.com>2009-10-26 11:21:32 (GMT)
commit92d8b0e1d6ecce8214b24a08b8a199af4321bd88 (patch)
tree6bdf23c1179d81c03fdadb3031f152601b7b5d0e /src/gui/kernel/qgesturemanager_p.h
parent20cddedfe5f422eb0607a5ac85870267b2788117 (diff)
downloadQt-92d8b0e1d6ecce8214b24a08b8a199af4321bd88.zip
Qt-92d8b0e1d6ecce8214b24a08b8a199af4321bd88.tar.gz
Qt-92d8b0e1d6ecce8214b24a08b8a199af4321bd88.tar.bz2
Implement QApplication::unregisterGestureRecognizer
Reviewed-by: Denis Dzyubenko
Diffstat (limited to 'src/gui/kernel/qgesturemanager_p.h')
-rw-r--r--src/gui/kernel/qgesturemanager_p.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/kernel/qgesturemanager_p.h b/src/gui/kernel/qgesturemanager_p.h
index f0e7225..eef45d2 100644
--- a/src/gui/kernel/qgesturemanager_p.h
+++ b/src/gui/kernel/qgesturemanager_p.h
@@ -104,7 +104,7 @@ private:
Qt::GestureType gesture;
ObjectGesture(QObject *o, const Qt::GestureType &g) : object(o), gesture(g) { }
- inline bool operator<(const ObjectGesture& rhs) const
+ inline bool operator<(const ObjectGesture &rhs) const
{
if (object.data() < rhs.object.data())
return true;
@@ -114,7 +114,8 @@ private:
}
};
- QMap<ObjectGesture, QGesture *> objectGestures;
+ // TODO rename all member vars to be m_
+ QMap<ObjectGesture, QGesture *> objectGestures; // TODO rename widgetGestures
QMap<QGesture *, QGestureRecognizer *> gestureToRecognizer;
QHash<QGesture *, QObject *> gestureOwners;
@@ -122,6 +123,10 @@ private:
int lastCustomGestureId;
+ QHash<QGestureRecognizer *, QList<QGesture *> > m_obsoleteGestures;
+ QMap<QGesture *, QGestureRecognizer *> m_deletedRecognizers;
+ void cleanupGesturesForRemovedRecognizer(QGesture *gesture);
+
QGesture *getState(QObject *widget, Qt::GestureType gesture);
void deliverEvents(const QSet<QGesture *> &gestures,
QSet<QGesture *> *undeliveredGestures);