diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2018-09-10 18:13:03 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2018-09-11 13:37:24 +0000 |
commit | 87cf774d4e91472d9630b4ae9efbf0a11f3d3a48 (patch) | |
tree | aad5e52cadc12f32d15c4f78d2e927961fdb219b | |
parent | f681bf66155a18fa0367401d17559ab4c93abd46 (diff) |
Doc: Show that DragHandler is now a multi-point handler
Inheritance changed, and that means it has a centroid property.
Amends ca7cdd71ee33f0d77eb6bf1367d2532e26155cb2
Task-number: QTBUG-68106
Change-Id: Ie68eb1376868b143dd56564a3abc896dd7e745c6
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
3 files changed, 8 insertions, 8 deletions
diff --git a/src/quick/doc/snippets/pointerHandlers/dragHandlerDifferentTarget.qml b/src/quick/doc/snippets/pointerHandlers/dragHandlerDifferentTarget.qml index a21ea1b39d..7e7662539f 100644 --- a/src/quick/doc/snippets/pointerHandlers/dragHandlerDifferentTarget.qml +++ b/src/quick/doc/snippets/pointerHandlers/dragHandlerDifferentTarget.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2018 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. @@ -57,8 +57,8 @@ Item { Rectangle { id: feedback border.color: "red" - width: Math.max(10, handler.point.ellipseDiameters.width) - height: Math.max(10, handler.point.ellipseDiameters.height) + width: Math.max(10, handler.centroid.ellipseDiameters.width) + height: Math.max(10, handler.centroid.ellipseDiameters.height) radius: Math.max(width, height) / 2 visible: handler.active } diff --git a/src/quick/doc/snippets/pointerHandlers/dragHandlerNullTarget.qml b/src/quick/doc/snippets/pointerHandlers/dragHandlerNullTarget.qml index d418e04731..c33f2b2782 100644 --- a/src/quick/doc/snippets/pointerHandlers/dragHandlerNullTarget.qml +++ b/src/quick/doc/snippets/pointerHandlers/dragHandlerNullTarget.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2018 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. @@ -61,9 +61,9 @@ Item { Text { color: handler.active ? "darkgreen" : "black" - text: handler.point.position.x.toFixed(1) + "," + handler.point.position.y.toFixed(1) - x: handler.point.position.x - width / 2 - y: handler.point.position.y - height + text: handler.centroid.centroid.x.toFixed(1) + "," + handler.centroid.position.y.toFixed(1) + x: handler.centroid.position.x - width / 2 + y: handler.centroid.position.y - height } } //![0] diff --git a/src/quick/handlers/qquickdraghandler.cpp b/src/quick/handlers/qquickdraghandler.cpp index b8f08639ef..aa66c16007 100644 --- a/src/quick/handlers/qquickdraghandler.cpp +++ b/src/quick/handlers/qquickdraghandler.cpp @@ -50,7 +50,7 @@ Q_LOGGING_CATEGORY(lcDragHandler, "qt.quick.handler.drag") /*! \qmltype DragHandler \instantiates QQuickDragHandler - \inherits SinglePointHandler + \inherits MultiPointHandler \inqmlmodule QtQuick \ingroup qtquick-input-handlers \brief Handler for dragging. |