Qt Declarative (Quick 2)
Go to file
Shawn Rutledge 7867a683fc Add PinchHandler.scaleAxis, rotationAxis; hold values in axes
Pointer Handlers that manipulate target item properties should now
use QQuickDragAxis consistently to:
- enforce minimum and maximum values
- hold the persistent and active values
- make those available via properties
- emit a new activeValueChanged(delta) signal when the value changes,
  so that it's possible to incrementally update a target item
  property in JS (onValueDelta: target.property += delta)

In the pinchHandler.qml example, you can use the PinchHandler to adjust
4 properties of one Rectangle independently (it requires coordination).

m_boundedActiveValue controls whether m_activeValue will be
kept between minimum and maximum. For rotation,
tst_QQuickPinchHandler::scaleNativeGesture() expects it to be,
although that seems questionable now, and may be addressed later.

[ChangeLog][QtQuick][Event Handlers] PinchHandler now has scaleAxis and
rotationAxis grouped properties, alongside the existing xAxis and yAxis;
and all of these now have activeValue and persistentValue properties.
The activeValueChanged signal includes a delta value, giving the
incremental change since the previous activeValue. The persistentValue
is settable, in case some target item property can be adjusted in
multiple ways: the handler's stored value can then be synced up with the
item property value after each external change. These features are
also added to DragHandler's xAxis and yAxis properties.

Task-number: QTBUG-68108
Task-number: QTBUG-76380
Task-number: QTBUG-76379
Task-number: QTBUG-94168
Change-Id: I78a5b43e9ba580448ef05054b6c4bc71b1834dd6
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2022-12-10 03:13:57 +01:00
LICENSES Use SPDX license identifiers 2022-06-11 08:05:15 +02:00
cmake Make Sure that `qml_compile_hash_p.h` Isn't Missing 2022-10-26 14:02:58 +02:00
coin qmldom: use a released Qt 6.3 2022-10-06 11:41:18 +00:00
dist
examples Add PinchHandler.scaleAxis, rotationAxis; hold values in axes 2022-12-10 03:13:57 +01:00
features
src Add PinchHandler.scaleAxis, rotationAxis; hold values in axes 2022-12-10 03:13:57 +01:00
tests Add PinchHandler.scaleAxis, rotationAxis; hold values in axes 2022-12-10 03:13:57 +01:00
tools Remove Qt keywords from all headers 2022-12-09 11:55:10 +08:00
.cmake.conf Mark the module free of qAsConst() 2022-12-05 20:46:21 +01:00
.gitattributes qmlformat: improve testing of file based options 2021-11-04 13:35:48 +01:00
.gitignore Remove "2" from Qt Quick Controls directories 2022-12-01 10:26:20 +08:00
.gitmodules
.tag Use tree hash rather than commit hash in .tag file 2022-01-25 23:55:27 +01:00
CMakeLists.txt Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-09-07 17:01:30 +02:00
README.md
conanfile.py Use SPDX license identifiers 2022-06-11 08:05:15 +02:00
configure.cmake Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-09-07 17:01:30 +02:00
dependencies.yaml Update dependencies on 'dev' in qt/qtdeclarative 2022-12-08 14:43:51 +00:00
qt_cmdline.cmake Remove "2" from Qt Quick Controls directories 2022-12-01 10:26:20 +08:00
qtdeclarative.doxy
sync.profile Remove "2" from Qt Quick Controls directories 2022-12-01 10:26:20 +08:00