qtdeclarative/tests/auto
Shawn Rutledge a432970b25 Standardize Drag/PinchHandler active/persistent scale, rotation, translation
PinchHandler.scale is persistent between gestures, whereas rotation and
translation were active-gesture properties; that wasn't consistent.
We fixed up DragHandler in just this way in 6.2.

The translationChanged() signal now comes with a vector delta, which is
often useful when writing an onTranslationChanged JS handler. Likewise,
scaleChanged() and rotationChanged() come with qreal deltas. The
scaleChanged() delta is multiplicative rather than additive, because
an additive delta would not be useful in cases when some target item's
scale can be adjusted by alternative means: you need to multiply it
in your onScaleChanged function.

Now that PinchHandler has 4 axes as grouped properties, some properties
in the handlers themselves begin to look redundant; but at least the
translation properties are useful to group x and y together. So in this
patch we continue to follow the pattern that was set in
60d11e1f69. PinchHandler.scale is
equivalent to persistentScale, whereas rotation is equivalent to
activeRotation; so we have a reason to deprecate those properties, as in
ea63ee5233.

The persistent values have setters, to provide another way for
applications to compensate when the values are adjusted by other means,
as an alternative to incremental changes via a script such as
rotationAxis.onValueDelta, onRotationChanged etc.

[ChangeLog][QtQuick][Event Handlers] PinchHandler.activeTranslation now
holds the amount of movement since the pinch gesture began.
PinchHandler.persistentTranslation holds the accumulated sum of
movement that has occurred during subsequent pinch gestures, and can
be set to arbitrary values between gestures. Likewise, activeScale,
persistentScale, activeRotation and persistentRotation follow the
same pattern. The scaleChanged, rotationChanged, and translationChanged
signals include delta arguments, which are useful for incrementally
adjusting a non-default item property when the target is null.

Fixes: QTBUG-76739
Task-number: QTBUG-94168
Change-Id: I6aaa1aa3356b85e6d27abc64bfa67781ecb4f062
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2022-12-10 19:18:21 +01:00
..
bic
cmake CMake: Add iOS build auto test for Qt Quick project 2022-12-02 13:58:55 +01:00
core QQmlStandardPaths: don't convert URLs to local files 2022-10-31 09:20:25 +08:00
guiapplauncher
particles Port from qAsConst() to std::as_const() 2022-10-07 23:38:56 +02:00
qml qmllint: Read the right register when analyzing calls 2022-12-09 23:22:09 +01:00
qmldom qmlformat: fix 'new line after ids properties' with normalize option 2022-11-18 22:05:05 +01:00
qmlls Port away from deprecated _qs UDL 2022-10-18 18:30:41 +02:00
qmltest createTemporaryObject: account for undefined parent argument 2022-09-30 00:19:06 +08:00
qmltest-blacklist Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-09-07 17:01:30 +02:00
quick Standardize Drag/PinchHandler active/persistent scale, rotation, translation 2022-12-10 19:18:21 +01:00
quickcontrols Merge "Merge remote-tracking branch 'origin/wip/material3' into dev" 2022-12-09 02:19:50 +01:00
quickdialogs Remove "2" from Qt Quick Controls directories 2022-12-01 10:26:20 +08:00
quicktest Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-09-07 17:01:30 +02:00
quickwidgets Port from container::count() and length() to size() 2022-10-07 23:38:48 +02:00
toolsupport Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-09-07 17:01:30 +02:00
CMakeLists.txt CMake: Add iOS build auto test for Qt Quick project 2022-12-02 13:58:55 +01:00