From cff0864fa54a8d38f5fba90e6fc99a8c3598a498 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Fri, 22 Sep 2017 14:23:53 +0200 Subject: change the type of DragHandler::translation to QVector2D; document it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For consistency we use QVector2D to represent relative movements in all Pointer Handlers. Change-Id: I23dc20c360b482a995d232e8a6d7e87d9bd8f600 Reviewed-by: Jan Arve Sæther --- src/quick/handlers/qquickdraghandler_p.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/quick/handlers/qquickdraghandler_p.h') 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; -- cgit v1.2.3