aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickevents_p_p.h
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2016-07-24 23:15:31 +0200
committerFrederik Gladhorn <frederik.gladhorn@qt.io>2016-07-25 22:04:34 +0000
commiteb238e2cf9013f9a6cd20af0a59180896abdc377 (patch)
treea9a84cf0df6440f01b0de2713e23c72277fde53d /src/quick/items/qquickevents_p_p.h
parented054acb9ca0ca8c86bcba7b290461b3177a7c50 (diff)
Keep track of grabbing inside QQuickEventPoint
With this we can get rid of "itemForTouchPointId" which kept track of the individual grabbing of touch points. The new approach allows big cleanups and makes understanding the code easier. Change-Id: I19f7cda1b430e088ada707b2e75d97ca8dbadcc5 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Diffstat (limited to 'src/quick/items/qquickevents_p_p.h')
-rw-r--r--src/quick/items/qquickevents_p_p.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/quick/items/qquickevents_p_p.h b/src/quick/items/qquickevents_p_p.h
index 63da48e5d0..ef6bba50ed 100644
--- a/src/quick/items/qquickevents_p_p.h
+++ b/src/quick/items/qquickevents_p_p.h
@@ -365,6 +365,7 @@ public: // helpers for C++ only (during event delivery)
virtual QQuickEventPoint *point(int i) const = 0;
virtual QQuickEventPoint *pointById(quint64 pointId) const = 0;
virtual QVector<QQuickItem *> grabbers() const = 0;
+ virtual void clearGrabbers() const = 0;
protected:
@@ -393,6 +394,7 @@ public:
QQuickEventPoint *pointById(quint64 pointId) const override;
bool allPointsAccepted() const override;
QVector<QQuickItem *> grabbers() const override;
+ void clearGrabbers() const override;
QMouseEvent *asMouseEvent() const;
@@ -416,6 +418,7 @@ public:
const QTouchEvent::TouchPoint *touchPointById(int pointId) const;
bool allPointsAccepted() const override;
QVector<QQuickItem *> grabbers() const override;
+ void clearGrabbers() const override;
QMouseEvent *syntheticMouseEvent(int pointID, QQuickItem *relativeTo) const;
QTouchEvent *touchEventForItem(const QList<const QQuickEventPoint *> &newPoints, QQuickItem *relativeTo) const;
@@ -507,6 +510,7 @@ public:
QQuickPointerEvent *pointerEvent() const { return m_event; }
static QQuickPointerDevice *touchDevice(QTouchDevice *d);
+ static QList<QQuickPointerDevice *> touchDevices();
static QQuickPointerDevice *genericMouseDevice();
static QQuickPointerDevice *tabletDevice(qint64);