aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/handlers/qquickpinchhandler.cpp
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2022-12-13 21:28:53 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2022-12-16 23:07:34 +0100
commit8813d9a22c7240a2c928f0ea8ce3370a8434da68 (patch)
tree19685bddd1d601f8d01a5e8ff6d0ebea6638e8ae /src/quick/handlers/qquickpinchhandler.cpp
parent730cdc5043a8823dfcdce7d3b2035875f8f987c1 (diff)
Remove QQuickDragAxis::persistentValue and changed signal for now
It's better to avoid releasing with this new property until we are sure we know its proper meaning. So far it seems that it should end up being identical to the target-item property to be set, rather than e.g. DragHandler.xAxis.persistentValue being the same as DragHandler.persistentTranslation.x. That is, it's an item property's current value, not a delta to adjust the value. Reverts part of 7867a683fcb938939fb2837a26ac8e1941e3fe08 Pick-to: 6.5 Task-number: QTBUG-109373 Change-Id: Id3a78332194c714e75b69cbaef111229d75318e0 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Diffstat (limited to 'src/quick/handlers/qquickpinchhandler.cpp')
-rw-r--r--src/quick/handlers/qquickpinchhandler.cpp26
1 files changed, 8 insertions, 18 deletions
diff --git a/src/quick/handlers/qquickpinchhandler.cpp b/src/quick/handlers/qquickpinchhandler.cpp
index 7b80a93b08..696d5c9a76 100644
--- a/src/quick/handlers/qquickpinchhandler.cpp
+++ b/src/quick/handlers/qquickpinchhandler.cpp
@@ -159,8 +159,6 @@ void QQuickPinchHandler::setActiveScale(qreal scale)
scale with a scale that was set in some other way, for example by another
handler. If you set this property directly, \c activeScale does not change,
and \c scaleChanged(1) is emitted.
-
- \sa QtQuick::PinchHandler::scaleAxis.persistentValue
*/
void QQuickPinchHandler::setPersistentScale(qreal rot)
@@ -259,8 +257,6 @@ void QQuickPinchHandler::setActiveRotation(qreal rot)
added; after the gesture ends, it stays the same; and when the next
pinch gesture begins, it begins to be modified by activeRotation again.
- \sa QtQuick::PinchHandler::rotationAxis.persistentValue
-
It's possible to set this property, as a way of synchronizing the basis
rotation with a rotation that was set in some other way, for example by
another handler. If you set this property directly, \c activeRotation does
@@ -370,7 +366,6 @@ bool QQuickPinchHandler::wantsPointerEvent(QPointerEvent *event)
\qmlproperty real QtQuick::PinchHandler::xAxis.maximum
\qmlproperty bool QtQuick::PinchHandler::xAxis.enabled
\qmlproperty real QtQuick::PinchHandler::xAxis.activeValue
- \qmlproperty real QtQuick::PinchHandler::xAxis.persistentValue
\c xAxis controls the constraints for horizontal translation of the \l target item.
@@ -378,8 +373,8 @@ bool QQuickPinchHandler::wantsPointerEvent(QPointerEvent *event)
\c maximum is the maximum acceptable x coordinate of the translation.
If \c enabled is true, horizontal dragging is allowed.
- The \c activeValueChanged signal is emitted when \c activeValue (and therefore
- \c persistentValue) changes, to provide the increment by which it changed.
+ The \c activeValueChanged signal is emitted when \c activeValue changes, to
+ provide the increment by which it changed.
This is intended for incrementally adjusting one property via multiple handlers.
\snippet pointerHandlers/pinchHandlerAxisValueDeltas.qml 0
@@ -396,7 +391,6 @@ bool QQuickPinchHandler::wantsPointerEvent(QPointerEvent *event)
\qmlproperty real QtQuick::PinchHandler::yAxis.maximum
\qmlproperty bool QtQuick::PinchHandler::yAxis.enabled
\qmlproperty real QtQuick::PinchHandler::yAxis.activeValue
- \qmlproperty real QtQuick::PinchHandler::yAxis.persistentValue
\c yAxis controls the constraints for vertical translation of the \l target item.
@@ -404,8 +398,8 @@ bool QQuickPinchHandler::wantsPointerEvent(QPointerEvent *event)
\c maximum is the maximum acceptable y coordinate of the translation.
If \c enabled is true, vertical dragging is allowed.
- The \c activeValueChanged signal is emitted when \c activeValue (and therefore
- \c persistentValue) changes, to provide the increment by which it changed.
+ The \c activeValueChanged signal is emitted when \c activeValue changes, to
+ provide the increment by which it changed.
This is intended for incrementally adjusting one property via multiple handlers.
\snippet pointerHandlers/pinchHandlerAxisValueDeltas.qml 0
@@ -422,7 +416,6 @@ bool QQuickPinchHandler::wantsPointerEvent(QPointerEvent *event)
\qmlproperty real QtQuick::PinchHandler::scaleAxis.maximum
\qmlproperty bool QtQuick::PinchHandler::scaleAxis.enabled
\qmlproperty real QtQuick::PinchHandler::scaleAxis.activeValue
- \qmlproperty real QtQuick::PinchHandler::scaleAxis.persistentValue
\c scaleAxis controls the constraints for setting the \l {QtQuick::Item::scale}{scale}
of the \l target item according to the distance between the touchpoints.
@@ -431,10 +424,9 @@ bool QQuickPinchHandler::wantsPointerEvent(QPointerEvent *event)
\c maximum is the maximum acceptable scale.
If \c enabled is true, scaling is allowed.
\c activeValue is the same as \l {QtQuick::PinchHandler::activeScale}.
- \c persistentValue is the same as \l {QtQuick::PinchHandler::persistentScale}.
- The \c activeValueChanged signal is emitted when \c activeValue (and therefore
- \c persistentValue) changes, to provide the multiplier for the incremental change.
+ The \c activeValueChanged signal is emitted when \c activeValue changes, to
+ provide the multiplier for the incremental change.
This is intended for incrementally adjusting one property via multiple handlers.
\snippet pointerHandlers/pinchHandlerAxisValueDeltas.qml 0
@@ -451,7 +443,6 @@ bool QQuickPinchHandler::wantsPointerEvent(QPointerEvent *event)
\qmlproperty real QtQuick::PinchHandler::rotationAxis.maximum
\qmlproperty bool QtQuick::PinchHandler::rotationAxis.enabled
\qmlproperty real QtQuick::PinchHandler::rotationAxis.activeValue
- \qmlproperty real QtQuick::PinchHandler::rotationAxis.persistentValue
\c rotationAxis controls the constraints for setting the \l {QtQuick::Item::rotation}{rotation}
of the \l target item according to the rotation of the group of touchpoints.
@@ -460,10 +451,9 @@ bool QQuickPinchHandler::wantsPointerEvent(QPointerEvent *event)
\c maximum is the maximum acceptable rotation.
If \c enabled is true, rotation is allowed.
\c activeValue is the same as \l {QtQuick::PinchHandler::activeRotation}.
- \c persistentValue is the same as \l {QtQuick::PinchHandler::persistentRotation}.
- The \c activeValueChanged signal is emitted when \c activeValue (and therefore
- \c persistentValue) changes, to provide the increment by which it changed.
+ The \c activeValueChanged signal is emitted when \c activeValue changes, to
+ provide the increment by which it changed.
This is intended for incrementally adjusting one property via multiple handlers.
\snippet pointerHandlers/pinchHandlerAxisValueDeltas.qml 0