diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-09-12 11:00:33 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-09-12 09:51:43 +0000 |
commit | 6fef83c37b2e4c1369a1f5cf7c68c54c9c5a27e9 (patch) | |
tree | 9e2f581949d71a18d29fbe2c68fdfabb4a960891 /src/quick/handlers/qquickpinchhandler_p.h | |
parent | 7f61147d534757daf24bc2459eac49864985dd8b (diff) |
PinchHandler: make the properties useful when target is null
An example is forthcoming in the form of a documentation snippet.
Also, translation is a relative measurement, so its type is now
QVector2D rather than QPointF. This doesn't change the QML API:
x and y properties are still defined.
Change-Id: I00f9a02a45c30899a568fe827f47cae9b4cc0f42
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'src/quick/handlers/qquickpinchhandler_p.h')
-rw-r--r-- | src/quick/handlers/qquickpinchhandler_p.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/quick/handlers/qquickpinchhandler_p.h b/src/quick/handlers/qquickpinchhandler_p.h index 356cc0eed3..b1ece494a5 100644 --- a/src/quick/handlers/qquickpinchhandler_p.h +++ b/src/quick/handlers/qquickpinchhandler_p.h @@ -70,7 +70,7 @@ class Q_AUTOTEST_EXPORT QQuickPinchHandler : public QQuickMultiPointHandler Q_PROPERTY(QVector2D centroidVelocity READ centroidVelocity NOTIFY updated) Q_PROPERTY(qreal scale READ scale NOTIFY updated) Q_PROPERTY(qreal rotation READ rotation NOTIFY updated) - Q_PROPERTY(QPointF translation READ translation NOTIFY updated) + Q_PROPERTY(QVector2D translation READ translation NOTIFY updated) Q_PROPERTY(qreal minimumX READ minimumX WRITE setMinimumX NOTIFY minimumXChanged) Q_PROPERTY(qreal maximumX READ maximumX WRITE setMaximumX NOTIFY maximumXChanged) Q_PROPERTY(qreal minimumY READ minimumY WRITE setMinimumY NOTIFY minimumYChanged) @@ -100,7 +100,7 @@ public: PinchOrigin pinchOrigin() const { return m_pinchOrigin; } void setPinchOrigin(PinchOrigin pinchOrigin); - QPointF translation() const { return m_activeTranslation; } + QVector2D translation() const { return m_activeTranslation; } qreal scale() const { return m_activeScale; } qreal rotation() const { return m_activeRotation; } QPointF centroid() const { return m_centroid; } @@ -136,7 +136,7 @@ private: // properties qreal m_activeScale; qreal m_activeRotation; - QPointF m_activeTranslation; + QVector2D m_activeTranslation; QPointF m_centroid; QVector2D m_centroidVelocity; |