qtdeclarative/examples
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
..
qml QmlExamples: Add missing dependencies of QtQuick in CMakeLists 2022-11-07 18:15:57 +01:00
qmltest Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-09-07 17:01:30 +02:00
quick Add PinchHandler.scaleAxis, rotationAxis; hold values in axes 2022-12-10 03:13:57 +01:00
quickcontrols Doc: remove "2" from Qt Quick Controls files 2022-12-01 10:26:28 +08:00
CMakeLists.txt Remove "2" from Qt Quick Controls directories 2022-12-01 10:26:20 +08:00
README
examples.pro Merge qtquickcontrols2 into qtdeclarative 2021-07-28 11:21:25 +02:00

README

The Qt Quick module provides the basic elements to specify and implement your
user interface declaratively, using the Qt Meta-Object Language (QML). The
Qt QML module provides the engine and language infrastructure for QML itself.
This language is very expressive and human readable, and can be used by
designers to actually implement their UI vision. QML UIs can integrate
with C++ code in many ways, including being loaded as a part of a C++ UI
and loading data models from C++ and interacting with them.

Mostof these examples can be viewed directly with the
QML viewer utility, without requiring compilation.

Documentation for these examples can be found via the Examples
link in the main Qt documentation.