summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicsscene_p.h
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2010-02-23 12:24:42 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2010-02-24 11:35:49 (GMT)
commit734ba1f540aaedc4a3558268bd7350c0b15325a4 (patch)
tree4a37ca7b02c311e9d7756fe84bf9210fa3354de9 /src/gui/graphicsview/qgraphicsscene_p.h
parent97b7a880cf97c166600df097ee178b8dec8cf3ce (diff)
downloadQt-734ba1f540aaedc4a3558268bd7350c0b15325a4.zip
Qt-734ba1f540aaedc4a3558268bd7350c0b15325a4.tar.gz
Qt-734ba1f540aaedc4a3558268bd7350c0b15325a4.tar.bz2
Improved gesture event delivery in graphicsview.
Made it possible to delete a gesture target from a gesture event handler. It is still not possible to delete some items (like an item that originated the gesture, i.e. that that the event that triggered the gesture to start), and in that case deleteLater() should be used. Reviewed-by: Andreas Aardal Hanssen
Diffstat (limited to 'src/gui/graphicsview/qgraphicsscene_p.h')
-rw-r--r--src/gui/graphicsview/qgraphicsscene_p.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene_p.h b/src/gui/graphicsview/qgraphicsscene_p.h
index 2e19a89..ca8b829 100644
--- a/src/gui/graphicsview/qgraphicsscene_p.h
+++ b/src/gui/graphicsview/qgraphicsscene_p.h
@@ -294,12 +294,17 @@ public:
bool allItemsIgnoreTouchEvents;
void enableTouchEventsOnViews();
+ QList<QGraphicsObject *> cachedTargetItems;
+ QHash<QGraphicsObject *, QSet<QGesture *> > cachedItemGestures;
+ QHash<QGraphicsObject *, QSet<QGesture *> > cachedAlreadyDeliveredGestures;
QHash<QGesture *, QGraphicsObject *> gestureTargets;
void gestureEventHandler(QGestureEvent *event);
- void getGestureTargets(const QSet<QGesture *> &gestures,
- QMap<Qt::GestureType, QGesture *> *conflictedGestures,
- QList<QList<QGraphicsObject *> > *conflictedItems,
- QHash<QGesture *, QGraphicsObject *> *normalGestures);
+ void gestureTargetsAtHotSpots(const QSet<QGesture *> &gestures,
+ Qt::GestureFlag flag,
+ QHash<QGraphicsObject *, QSet<QGesture *> > *targets,
+ QSet<QGraphicsObject *> *itemsSet = 0,
+ QSet<QGesture *> *normal = 0,
+ QSet<QGesture *> *conflicts = 0);
void cancelGesturesForChildren(QGesture *original);
void updateInputMethodSensitivityInViews();