diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-09-22 14:09:45 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-09-29 05:17:05 +0000 |
commit | 8ebe8f6eeb798918486e1e9124a567dd90deff23 (patch) | |
tree | 8d42ed4fa03433dd27775ee15925c2e6be844f40 | |
parent | 6ed738f8ceb55a705430989b9ff374927e51d227 (diff) |
improve documentation of PinchHandler
The readonly properties were omitted until now.
Change-Id: Ia4f4b8ff5a390f6e802008c9c636d7d8ab2a3278
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
-rw-r--r-- | src/quick/handlers/qquickpinchhandler.cpp | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/quick/handlers/qquickpinchhandler.cpp b/src/quick/handlers/qquickpinchhandler.cpp index 3cd99fe1a2..eb544ff169 100644 --- a/src/quick/handlers/qquickpinchhandler.cpp +++ b/src/quick/handlers/qquickpinchhandler.cpp @@ -55,6 +55,7 @@ Q_LOGGING_CATEGORY(lcPinchHandler, "qt.quick.handler.pinch") /*! \qmltype PinchHandler \instantiates QQuickPinchHandler + \inherits MultiPointHandler \inqmlmodule Qt.labs.handlers \ingroup qtquick-handlers \brief Handler for pinch gestures @@ -374,4 +375,51 @@ void QQuickPinchHandler::handlePointerEventImpl(QQuickPointerEvent *event) emit updated(); } +/*! + \readonly + \qmlproperty QPointF QtQuick::PinchHandler::centroid + + A point exactly in the middle of the currently-pressed touch points. + If \l pinchOrigin is set to \c PinchCenter, the \l target will be rotated + around this point. +*/ + +/*! + \readonly + \qmlproperty QVector2D QtQuick::PinchHandler::centroidVelocity + + The average velocity of the \l centroid: a vector representing the speed + and direction of movement of the whole group of touchpoints, in logical + pixels per second. +*/ + +/*! + \readonly + \qmlproperty real QtQuick::PinchHandler::scale + + The scale factor. It is 1.0 when the gesture begins, increases as the + touchpoints are spread apart, and decreases as the touchpoints are brought + together. If \l target is not null, this will be automatically applied to its + \l {Item::scale}{scale}. Otherwise, bindings can be used to do arbitrary + things with this value. +*/ + +/*! + \readonly + \qmlproperty real QtQuick::PinchHandler::rotation + + The rotation of the pinch gesture in degrees, with positive values clockwise. + It is 0 when the gesture begins. If \l target is not null, this will be + automatically applied to its \l {Item::rotation}{rotation}. Otherwise, + bindings can be used to do arbitrary things with this value. +*/ + +/*! + \readonly + \qmlproperty QVector2D QtQuick::PinchHandler::translation + + The translation of the gesture \l centroid. It is \c (0, 0) when the + gesture begins. +*/ + QT_END_NAMESPACE |