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 | |
parent | c494da05e1d3cb597990098e9713a0af5364c828 (diff) | |
download | Qt-2c0255521f00a1fd95988161a03c39631350eaba.zip Qt-2c0255521f00a1fd95988161a03c39631350eaba.tar.gz Qt-2c0255521f00a1fd95988161a03c39631350eaba.tar.bz2 |
Follow renamed to SpringFollow.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/declarative/aspectratio/face_fit_animated.qml | 2 | ||||
-rw-r--r-- | examples/declarative/clock/Clock.qml | 6 | ||||
-rw-r--r-- | examples/declarative/dial/DialLibrary/Dial.qml | 4 | ||||
-rw-r--r-- | examples/declarative/follow/follow.qml | 10 | ||||
-rw-r--r-- | examples/declarative/follow/pong.qml | 6 | ||||
-rw-r--r-- | examples/declarative/listview/highlight.qml | 2 | ||||
-rw-r--r-- | examples/declarative/snow/snow.qml | 6 | ||||
-rw-r--r-- | examples/declarative/velocity/Day.qml | 2 |
8 files changed, 19 insertions, 19 deletions
diff --git a/examples/declarative/aspectratio/face_fit_animated.qml b/examples/declarative/aspectratio/face_fit_animated.qml index 2768150..7db1c80 100644 --- a/examples/declarative/aspectratio/face_fit_animated.qml +++ b/examples/declarative/aspectratio/face_fit_animated.qml @@ -16,7 +16,7 @@ Rectangle { source: "pics/face.png" x: (parent.width-width*scale)/2 y: (parent.height-height*scale)/2 - scale: Follow { + scale: SpringFollow { source: Math.max(Math.min(Image.parent.width/Image.width*1.333,Image.parent.height/Image.height), Math.min(Image.parent.width/Image.width,Image.parent.height/Image.height*1.333)) spring: 1 diff --git a/examples/declarative/clock/Clock.qml b/examples/declarative/clock/Clock.qml index e152be3..6064dd4 100644 --- a/examples/declarative/clock/Clock.qml +++ b/examples/declarative/clock/Clock.qml @@ -28,7 +28,7 @@ Item { id: HourRotation origin.x: 4; origin.y: 45 angle: 0 - angle: Follow { + angle: SpringFollow { spring: 2 damping: .2 source: Clock.hours * 50 * 3 + Clock.minutes / 2 @@ -44,7 +44,7 @@ Item { id: MinuteRotation origin.x: 4; origin.y: 70 angle: 0 - angle: Follow { + angle: SpringFollow { spring: 2 damping: .2 source: Clock.minutes * 6 @@ -60,7 +60,7 @@ Item { id: SecondRotation origin.x: 2; origin.y: 60 angle: 0 - angle: Follow { + angle: SpringFollow { spring: 5 damping: .25 modulus: 360 diff --git a/examples/declarative/dial/DialLibrary/Dial.qml b/examples/declarative/dial/DialLibrary/Dial.qml index f53b25e..1a163a8 100644 --- a/examples/declarative/dial/DialLibrary/Dial.qml +++ b/examples/declarative/dial/DialLibrary/Dial.qml @@ -26,8 +26,8 @@ Item { id: NeedleRotation origin.x: 7; origin.y: 65 angle: -130 - angle: Follow { -id: MyFollow + angle: SpringFollow { + id: MyFollow spring: 1.4 damping: .15 source: Math.min(Math.max(-130, Root.value*2.2 - 130), 133) 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' } diff --git a/examples/declarative/listview/highlight.qml b/examples/declarative/listview/highlight.qml index 2bf3a9f..e707ac0 100644 --- a/examples/declarative/listview/highlight.qml +++ b/examples/declarative/listview/highlight.qml @@ -44,7 +44,7 @@ Rectangle { id: PetHighlight Rectangle { width: 200; height: 50; color: "#FFFF88" - y: Follow { source: List1.current.y; spring: 3; damping: 0.1 } + y: SpringFollow { source: List1.current.y; spring: 3; damping: 0.1 } } } ListView { diff --git a/examples/declarative/snow/snow.qml b/examples/declarative/snow/snow.qml index b6781c3..2241c3f 100644 --- a/examples/declarative/snow/snow.qml +++ b/examples/declarative/snow/snow.qml @@ -30,15 +30,15 @@ Rectangle { property bool slowDeform: true property real deform: 0 - deform: Follow { + deform: SpringFollow { id: "DeformFollow"; source: MyLayout.targetDeform; velocity: MyLayout.slowDeform?0.1:2 onSyncChanged: if(inSync) { MyLayout.slowDeform = true; MyLayout.targetDeform = 0; } } ImageBatch { offset: 0; ref: ImagePanel } - x: Follow { source: MyLayout.targetX; velocity: 1000 } - y: Follow { source: -(selectedY + imageHeight / 2); velocity: 500 } + x: SpringFollow { source: MyLayout.targetX; velocity: 1000 } + y: SpringFollow { source: -(selectedY + imageHeight / 2); velocity: 500 } } transform: Rotation { diff --git a/examples/declarative/velocity/Day.qml b/examples/declarative/velocity/Day.qml index 06d0bd4..4001a3e 100644 --- a/examples/declarative/velocity/Day.qml +++ b/examples/declarative/velocity/Day.qml @@ -31,7 +31,7 @@ Rectangle { x: Math.random() * 200 + 100 y: Math.random() * 300 + 50 id: StickyPage - rotation: Follow { + rotation: SpringFollow { source: -Flick.horizontalVelocity / 100 spring: 2.0 damping: 0.1 |