diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2016-07-07 14:02:54 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-09-29 05:17:22 +0000 |
commit | a4439d6baf6996fd018575f5ed752b4d4429f92a (patch) | |
tree | 2e6ce4d50dc5020b27f36080164058bf40048d23 /src/quick/handlers/qquickmultipointhandler.cpp | |
parent | 8ebe8f6eeb798918486e1e9124a567dd90deff23 (diff) |
improve documentation of the PointerHandler base classes and index
also QQuickPointerEvent and QQuickPointerDevice
Change-Id: I8bdb7c26cf6a5775a77dbf748c47c170270c5fff
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'src/quick/handlers/qquickmultipointhandler.cpp')
-rw-r--r-- | src/quick/handlers/qquickmultipointhandler.cpp | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/src/quick/handlers/qquickmultipointhandler.cpp b/src/quick/handlers/qquickmultipointhandler.cpp index 41d8b228a1..2ced136026 100644 --- a/src/quick/handlers/qquickmultipointhandler.cpp +++ b/src/quick/handlers/qquickmultipointhandler.cpp @@ -46,8 +46,17 @@ QT_BEGIN_NAMESPACE /*! + \qmltype MultiPointHandler + \since 5.10 + \preliminary + \instantiates QQuickMultiPointHandler + \inherits PointerDeviceHandler + \inqmlmodule Qt.labs.handlers + \ingroup qtquick-handlers + \brief Abstract handler for multi-point Pointer Events. + An intermediate class (not registered as a QML type) - for the type of handler which requires and acts upon a specific number + for any type of handler which requires and acts upon a specific number of multiple touchpoints. */ QQuickMultiPointHandler::QQuickMultiPointHandler(QObject *parent, int requiredPointCount) @@ -99,6 +108,20 @@ QVector<QQuickEventPoint *> QQuickMultiPointHandler::eligiblePoints(QQuickPointe return ret; } +/*! + \qmlproperty int MultiPointHandler::requiredPointCount + + The number of touchpoints that are required to activate this handler. If + a smaller number of touchpoints are in contact with the + \l {PointerHandler::parent}{parent}, they will be ignored. If a larger number + of touchpoints are in contact, the required number of points will be + chosen in the order that they are pressed, and the remaining points will + be ignored. Any ignored points are eligible to activate other Pointer + Handlers, which have different constraints, on the same Item or on other + Items. + + The default value is 2. +*/ void QQuickMultiPointHandler::setRequiredPointCount(int c) { if (m_requiredPointCount == c) @@ -108,6 +131,21 @@ void QQuickMultiPointHandler::setRequiredPointCount(int c) emit requiredPointCountChanged(); } + +/*! + \qmlproperty real MultiPointHandler::pointDistanceThreshold + + The margin beyond the bounds of the \l {PointerHandler::parent}{parent} + item within which a touch point can activate this handler. For example, on + a PinchHandler where the \l {PointerHandler::target}{target} is also the + \c parent, it's useful to set this to a distance at least half the width + of a typical user's finger, so that if the \c parent has been scaled down + to a very small size, the pinch gesture is still possible. + + The default value is 0. + + \image pointDistanceThreshold.png +*/ void QQuickMultiPointHandler::setPointDistanceThreshold(qreal pointDistanceThreshold) { if (m_pointDistanceThreshold == pointDistanceThreshold) |