diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2016-12-08 19:19:04 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2016-12-29 10:52:31 +0000 |
commit | 871314ced803afe0ac31033cfbd79fa4c1b18e3d (patch) | |
tree | 290bab4f0161c0880c1d7af8e68fd13b4ff42cee /src/quick/handlers/qquickpointersinglehandler_p.h | |
parent | 70113ef66b245e58ce12e2a9d26268e2eaeb3a42 (diff) |
DragHandler active property replaces dragging; same as grabbing
If a QQuickPointerSingleHandler grabs a point, it's definitely in the
active state: doing something with the point. (The converse is not
always true though: e.g. TapHandler can sometimes detect a tap without
ever grabbing.)
In DragHandler, the "dragging" property means the same as "active":
we always grab when dragging, to be sure to get the updates. So the
"dragging" property is removed because it's redundant.
In QQuickPointerHandler we don't say that "wanting" an event is the
same as being active, because 1) it won't necessarily grab right away
and 2) every handler which was active should "want" the release event,
yet it needs to setActive(false) as soon as it's done processing it.
Change-Id: Ie010db54714a7914109da6469e79865f9a0a18e4
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'src/quick/handlers/qquickpointersinglehandler_p.h')
-rw-r--r-- | src/quick/handlers/qquickpointersinglehandler_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/quick/handlers/qquickpointersinglehandler_p.h b/src/quick/handlers/qquickpointersinglehandler_p.h index 69a3263271..e3c6bfaddf 100644 --- a/src/quick/handlers/qquickpointersinglehandler_p.h +++ b/src/quick/handlers/qquickpointersinglehandler_p.h @@ -77,6 +77,7 @@ protected: quint64 currentPointId() const { return m_currentPointId; } QQuickEventPoint *currentPoint(QQuickPointerEvent *ev) { return ev->pointById(m_currentPointId); } void handleGrabCancel(QQuickEventPoint *point) override; + void onGrabChanged(QQuickEventPoint *point) override; private: void setPressedButtons(Qt::MouseButtons buttons); |