diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-09-22 14:23:53 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-09-29 05:16:33 +0000 |
commit | cff0864fa54a8d38f5fba90e6fc99a8c3598a498 (patch) | |
tree | 8c28d6fabd7c245d47a1658f4058c0bcae51445e /src/quick/handlers/qquickdraghandler_p.h | |
parent | 930aea8b9ca59a24838cf7f279653e3b2ee40cee (diff) |
change the type of DragHandler::translation to QVector2D; document it
For consistency we use QVector2D to represent relative movements in all
Pointer Handlers.
Change-Id: I23dc20c360b482a995d232e8a6d7e87d9bd8f600
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'src/quick/handlers/qquickdraghandler_p.h')
-rw-r--r-- | src/quick/handlers/qquickdraghandler_p.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/quick/handlers/qquickdraghandler_p.h b/src/quick/handlers/qquickdraghandler_p.h index b28fb630b8..d10084c654 100644 --- a/src/quick/handlers/qquickdraghandler_p.h +++ b/src/quick/handlers/qquickdraghandler_p.h @@ -90,7 +90,7 @@ class Q_AUTOTEST_EXPORT QQuickDragHandler : public QQuickSinglePointHandler Q_OBJECT Q_PROPERTY(QQuickDragAxis * xAxis READ xAxis CONSTANT) Q_PROPERTY(QQuickDragAxis * yAxis READ yAxis CONSTANT) - Q_PROPERTY(QPointF translation READ translation NOTIFY translationChanged) + Q_PROPERTY(QVector2D translation READ translation NOTIFY translationChanged) public: explicit QQuickDragHandler(QObject *parent = 0); @@ -101,8 +101,8 @@ public: QQuickDragAxis *xAxis() { return &m_xAxis; } QQuickDragAxis *yAxis() { return &m_yAxis; } - QPointF translation() const { return m_translation; } - void setTranslation(const QPointF &trans); + QVector2D translation() const { return m_translation; } + void setTranslation(const QVector2D &trans); Q_INVOKABLE void enforceConstraints(); @@ -122,7 +122,7 @@ private: private: QPointF m_targetStartPos; - QPointF m_translation; + QVector2D m_translation; QQuickDragAxis m_xAxis; QQuickDragAxis m_yAxis; |