summaryrefslogtreecommitdiffstats
path: root/examples/declarative/snow
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2009-07-20 03:56:48 (GMT)
committerMartin Jones <martin.jones@nokia.com>2009-07-20 03:56:48 (GMT)
commit2d0e618db203d47bfe5bda50e9cf258a19e9745c (patch)
treed944f1546d2388ca1facec33012120e94097b61d /examples/declarative/snow
parentbabb3bb4bb0de6cd2129d29fd6a90695bcbd53e2 (diff)
downloadQt-2d0e618db203d47bfe5bda50e9cf258a19e9745c.zip
Qt-2d0e618db203d47bfe5bda50e9cf258a19e9745c.tar.gz
Qt-2d0e618db203d47bfe5bda50e9cf258a19e9745c.tar.bz2
Add an inSync property that holds whether the target has "caught up"
Useful for determining when the target has finished animating.
Diffstat (limited to 'examples/declarative/snow')
-rw-r--r--examples/declarative/snow/snow.qml9
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/declarative/snow/snow.qml b/examples/declarative/snow/snow.qml
index 2b413bb..f65e0ac 100644
--- a/examples/declarative/snow/snow.qml
+++ b/examples/declarative/snow/snow.qml
@@ -27,11 +27,12 @@ Rect {
property real targetDeform: 0
property bool slowDeform: true
- property real deform
- deform: Follow { source: MyLayout.targetDeform; velocity: MyLayout.slowDeform?0.1:2 }
+ property real deform: 0
+ deform: Follow {
+ id: "DeformFollow"; source: MyLayout.targetDeform; velocity: MyLayout.slowDeform?0.1:2
+ onSyncChanged: if(inSync) { MyLayout.slowDeform = true; MyLayout.targetDeform = 0; }
+ }
- onDeformChanged: if(deform == targetDeform) { slowDeform = true; targetDeform = 0; }
-
ImageBatch { offset: 0; ref: ImagePanel }
x: Follow { source: MyLayout.targetX; velocity: 1000 }