summaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qmlfollow.cpp
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-05-01 00:56:31 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-05-01 00:56:31 (GMT)
commit7af48b011d1f84e4790fc4b9bdcd65e860c011a7 (patch)
treeb924119f9d5bc227ec896c8a0fd5fd68ae5b80bb /src/declarative/util/qmlfollow.cpp
parent788d5384e07f91b0f88efb2101b427e6edb79399 (diff)
parent09be36905f81923e665743520b93a24af0ec784d (diff)
downloadQt-7af48b011d1f84e4790fc4b9bdcd65e860c011a7.zip
Qt-7af48b011d1f84e4790fc4b9bdcd65e860c011a7.tar.gz
Qt-7af48b011d1f84e4790fc4b9bdcd65e860c011a7.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/declarative/util/qmlfollow.cpp')
-rw-r--r--src/declarative/util/qmlfollow.cpp36
1 files changed, 23 insertions, 13 deletions
diff --git a/src/declarative/util/qmlfollow.cpp b/src/declarative/util/qmlfollow.cpp
index 0143678..8e5ae69 100644
--- a/src/declarative/util/qmlfollow.cpp
+++ b/src/declarative/util/qmlfollow.cpp
@@ -175,19 +175,29 @@ void QmlFollowPrivate::stop()
In example below, Rect2 will follow Rect1 moving with a velocity of up to 200:
\code
- <Rect id="Rect1" y="{200}" width="20" height="20" color="#00ff00">
- <y>
- <SequentialAnimation running="true" repeat="true">
- <NumericAnimation to="{200}" easing="easeOutBounce(amplitude:100)" duration="2000" />
- <PauseAnimation duration="1000" />
- </SequentialAnimation>
- </y>
- </Rect>
- <Rect id="Rect2" x="{Rect1.width}" width="20" height="20" color="#ff0000">
- <y>
- <Follow source="{Rect1.y}" velocity="200"/>
- </y>
- </Rect>
+ Rect {
+ id: Rect1
+ width: 20; height: 20
+ color: "#00ff00"
+ y: 200 //initial value
+ y: SequentialAnimation {
+ running: true
+ repeat: true
+ NumericAnimation {
+ to: 200
+ easing: "easeOutBounce(amplitude:100)"
+ duration: 2000
+ }
+ PauseAnimation { duration: 1000 }
+ }
+ }
+ Rect {
+ id: Rect2
+ x: Rect1.width
+ width: 20; height: 20
+ color: "#ff0000"
+ y: Follow { source: Rect1.y; velocity: 200 }
+ }
\endcode
*/