aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/handlers/qquickpointersinglehandler_p.h
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2017-03-30 15:39:44 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2017-04-24 17:16:38 +0000
commitb8dbafcae9ccfbf5c2ef7a173c51a73e57476681 (patch)
tree286ed103ed40450681fd2de7a140b8c9ce2b143b /src/quick/handlers/qquickpointersinglehandler_p.h
parentd728ad7ace09c2b35d6753fc08c4092ea8813193 (diff)
QQuickPointerSingleHandler: add setIgnoreAdditionalPoints
After 3523b676382db4aa39adeb9126d8bb2185e84403 it became impossible to write a subclass which handles one point and ignores the rest. In some cases this is necessary. Change-Id: I27511e6112a93ef98a4cf45c8531287781698b5b 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.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/quick/handlers/qquickpointersinglehandler_p.h b/src/quick/handlers/qquickpointersinglehandler_p.h
index 9c854c4d0d..466de1a1eb 100644
--- a/src/quick/handlers/qquickpointersinglehandler_p.h
+++ b/src/quick/handlers/qquickpointersinglehandler_p.h
@@ -106,6 +106,8 @@ protected:
QQuickEventPoint *currentPoint(QQuickPointerEvent *ev) { return ev->pointById(m_pointId); }
void onGrabChanged(QQuickPointerHandler *grabber, QQuickEventPoint::GrabState stateChange, QQuickEventPoint *point) override;
+ void setIgnoreAdditionalPoints(bool v = true);
+
private:
void setPressedButtons(Qt::MouseButtons buttons);
void reset();
@@ -122,6 +124,7 @@ private:
qreal m_pressure;
QSizeF m_ellipseDiameters;
Qt::MouseButtons m_acceptedButtons;
+ bool m_ignoreAdditionalPoints : 1;
};
QT_END_NAMESPACE