diff options
author | Martin Jones <martin.jones@nokia.com> | 2009-09-10 03:21:36 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2009-09-10 03:21:36 (GMT) |
commit | 2c0255521f00a1fd95988161a03c39631350eaba (patch) | |
tree | 20947c82c768b3aa785628e92ae0ee7a0ac3bfbd /examples/declarative/follow | |
parent | c494da05e1d3cb597990098e9713a0af5364c828 (diff) | |
download | Qt-2c0255521f00a1fd95988161a03c39631350eaba.zip Qt-2c0255521f00a1fd95988161a03c39631350eaba.tar.gz Qt-2c0255521f00a1fd95988161a03c39631350eaba.tar.bz2 |
Follow renamed to SpringFollow.
Diffstat (limited to 'examples/declarative/follow')
-rw-r--r-- | examples/declarative/follow/follow.qml | 10 | ||||
-rw-r--r-- | examples/declarative/follow/pong.qml | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/examples/declarative/follow/follow.qml b/examples/declarative/follow/follow.qml index 37dc2e8..1f585e2 100644 --- a/examples/declarative/follow/follow.qml +++ b/examples/declarative/follow/follow.qml @@ -26,7 +26,7 @@ Rectangle { color: "#ff0000" x: Rect.width; width: Rect.width; height: 20 y: 200 - y: Follow { source: Rect.y; velocity: 200 } + y: SpringFollow { source: Rect.y; velocity: 200 } } Text { x: Rect.width; y: 220; text: "Velocity" } @@ -35,13 +35,13 @@ Rectangle { color: "#ff0000" x: Rect.width * 2; width: Rect.width/2; height: 20 y: 200 - y: Follow { source: Rect.y; spring: 1.0; damping: 0.2 } + y: SpringFollow { source: Rect.y; spring: 1.0; damping: 0.2 } } Rectangle { color: "#880000" x: Rect.width * 2.5; width: Rect.width/2; height: 20 y: 200 - y: Follow { source: Rect.y; spring: 1.0; damping: 0.2; mass: 3.0 } // "heavier" object + y: SpringFollow { source: Rect.y; spring: 1.0; damping: 0.2; mass: 3.0 } // "heavier" object } Text { x: Rect.width * 2; y: 220; text: "Spring" } @@ -54,8 +54,8 @@ Rectangle { width: 20; height: 20 radius: 10 color: "#0000ff" - x: Follow { id: "F1"; source: Mouse.mouseX-10; spring: 1.0; damping: 0.05; epsilon: 0.25 } - y: Follow { id: "F2"; source: Mouse.mouseY-10; spring: 1.0; damping: 0.05; epsilon: 0.25 } + x: SpringFollow { id: "F1"; source: Mouse.mouseX-10; spring: 1.0; damping: 0.05; epsilon: 0.25 } + y: SpringFollow { id: "F2"; source: Mouse.mouseY-10; spring: 1.0; damping: 0.05; epsilon: 0.25 } states: [ State { name: "following" diff --git a/examples/declarative/follow/pong.qml b/examples/declarative/follow/pong.qml index 0314bb8..b51c0d0 100644 --- a/examples/declarative/follow/pong.qml +++ b/examples/declarative/follow/pong.qml @@ -25,7 +25,7 @@ Rectangle { } // Make y follow the target y coordinate, with a velocity of 200 - y: Follow { source: Ball.targetY; velocity: 200 } + y: SpringFollow { source: Ball.targetY; velocity: 200 } // Detect the ball hitting the top or bottom of the view and bounce it onYChanged: { @@ -42,7 +42,7 @@ Rectangle { id: LeftBat color: "#00ee00" x: 2; width: 20; height: 90 - y: Follow { + y: SpringFollow { source: Ball.y-45; velocity: 300 enabled: Ball.direction == 'left' } @@ -51,7 +51,7 @@ Rectangle { id: RightBat color: "#00ee00" x: Page.width-22; width: 20; height: 90 - y: Follow { + y: SpringFollow { source: Ball.y-45; velocity: 300 enabled: Ball.direction == 'right' } |