diff options
author | Leonardo Sobral Cunha <leo.cunha@nokia.com> | 2010-02-23 07:25:10 (GMT) |
---|---|---|
committer | Leonardo Sobral Cunha <leo.cunha@nokia.com> | 2010-02-23 08:12:08 (GMT) |
commit | 9701facad44f8e435f0efe6417ffb7d17d5712e7 (patch) | |
tree | ee76ea7b313078b4ec6753f28b9ea6bf153aadc2 /examples | |
parent | 0a7ca8efdd292f317d4c95a80485d9d51f14a694 (diff) | |
download | Qt-9701facad44f8e435f0efe6417ffb7d17d5712e7.zip Qt-9701facad44f8e435f0efe6417ffb7d17d5712e7.tar.gz Qt-9701facad44f8e435f0efe6417ffb7d17d5712e7.tar.bz2 |
Updates all qml examples/demos to use the easing curve value type syntax
Diffstat (limited to 'examples')
-rw-r--r-- | examples/declarative/animations/easing.qml | 86 | ||||
-rw-r--r-- | examples/declarative/animations/property-animation.qml | 8 | ||||
-rw-r--r-- | examples/declarative/behaviours/test.qml | 6 | ||||
-rw-r--r-- | examples/declarative/border-image/content/MyBorderImage.qml | 8 | ||||
-rw-r--r-- | examples/declarative/connections/connections.qml | 2 | ||||
-rw-r--r-- | examples/declarative/fonts/hello.qml | 2 | ||||
-rw-r--r-- | examples/declarative/layouts/Button.qml | 2 | ||||
-rw-r--r-- | examples/declarative/layouts/positioners.qml | 16 | ||||
-rw-r--r-- | examples/declarative/parallax/qml/Smiley.qml | 8 | ||||
-rw-r--r-- | examples/declarative/slideswitch/content/Switch.qml | 2 | ||||
-rw-r--r-- | examples/declarative/states/transitions.qml | 8 | ||||
-rw-r--r-- | examples/declarative/tutorials/helloworld/tutorial3.qml | 2 | ||||
-rw-r--r-- | examples/declarative/xmldata/yahoonews.qml | 2 |
13 files changed, 77 insertions, 75 deletions
diff --git a/examples/declarative/animations/easing.qml b/examples/declarative/animations/easing.qml index 9b5bcc6..a7ba1c5 100644 --- a/examples/declarative/animations/easing.qml +++ b/examples/declarative/animations/easing.qml @@ -6,47 +6,47 @@ Rectangle { ListModel { id: easingTypes - ListElement { type: "easeLinear"; ballColor: "DarkRed" } - ListElement { type: "easeInQuad"; ballColor: "IndianRed" } - ListElement { type: "easeOutQuad"; ballColor: "Salmon" } - ListElement { type: "easeInOutQuad"; ballColor: "Tomato" } - ListElement { type: "easeOutInQuad"; ballColor: "DarkOrange" } - ListElement { type: "easeInCubic"; ballColor: "Gold" } - ListElement { type: "easeOutCubic"; ballColor: "Yellow" } - ListElement { type: "easeInOutCubic"; ballColor: "PeachPuff" } - ListElement { type: "easeOutInCubic"; ballColor: "Thistle" } - ListElement { type: "easeInQuart"; ballColor: "Orchid" } - ListElement { type: "easeOutQuart"; ballColor: "Purple" } - ListElement { type: "easeInOutQuart"; ballColor: "SlateBlue" } - ListElement { type: "easeOutInQuart"; ballColor: "Chartreuse" } - ListElement { type: "easeInQuint"; ballColor: "LimeGreen" } - ListElement { type: "easeOutQuint"; ballColor: "SeaGreen" } - ListElement { type: "easeInOutQuint"; ballColor: "DarkGreen" } - ListElement { type: "easeOutInQuint"; ballColor: "Olive" } - ListElement { type: "easeInSine"; ballColor: "DarkSeaGreen" } - ListElement { type: "easeOutSine"; ballColor: "Teal" } - ListElement { type: "easeInOutSine"; ballColor: "Turquoise" } - ListElement { type: "easeOutInSine"; ballColor: "SteelBlue" } - ListElement { type: "easeInExpo"; ballColor: "SkyBlue" } - ListElement { type: "easeOutExpo"; ballColor: "RoyalBlue" } - ListElement { type: "easeInOutExpo"; ballColor: "MediumBlue" } - ListElement { type: "easeOutInExpo"; ballColor: "MidnightBlue" } - ListElement { type: "easeInCirc"; ballColor: "CornSilk" } - ListElement { type: "easeOutCirc"; ballColor: "Bisque" } - ListElement { type: "easeInOutCirc"; ballColor: "RosyBrown" } - ListElement { type: "easeOutInCirc"; ballColor: "SandyBrown" } - ListElement { type: "easeInElastic"; ballColor: "DarkGoldenRod" } - ListElement { type: "easeOutElastic"; ballColor: "Chocolate" } - ListElement { type: "easeInOutElastic"; ballColor: "SaddleBrown" } - ListElement { type: "easeOutInElastic"; ballColor: "Brown" } - ListElement { type: "easeInBack"; ballColor: "Maroon" } - ListElement { type: "easeOutBack"; ballColor: "LavenderBlush" } - ListElement { type: "easeInOutBack"; ballColor: "MistyRose" } - ListElement { type: "easeOutInBack"; ballColor: "Gainsboro" } - ListElement { type: "easeOutBounce"; ballColor: "Silver" } - ListElement { type: "easeInBounce"; ballColor: "DimGray" } - ListElement { type: "easeInOutBounce"; ballColor: "SlateGray" } - ListElement { type: "easeOutInBounce"; ballColor: "DarkSlateGray" } + ListElement { type: "Linear"; ballColor: "DarkRed" } + ListElement { type: "InQuad"; ballColor: "IndianRed" } + ListElement { type: "OutQuad"; ballColor: "Salmon" } + ListElement { type: "InOutQuad"; ballColor: "Tomato" } + ListElement { type: "OutInQuad"; ballColor: "DarkOrange" } + ListElement { type: "InCubic"; ballColor: "Gold" } + ListElement { type: "OutCubic"; ballColor: "Yellow" } + ListElement { type: "InOutCubic"; ballColor: "PeachPuff" } + ListElement { type: "OutInCubic"; ballColor: "Thistle" } + ListElement { type: "InQuart"; ballColor: "Orchid" } + ListElement { type: "OutQuart"; ballColor: "Purple" } + ListElement { type: "InOutQuart"; ballColor: "SlateBlue" } + ListElement { type: "OutInQuart"; ballColor: "Chartreuse" } + ListElement { type: "InQuint"; ballColor: "LimeGreen" } + ListElement { type: "OutQuint"; ballColor: "SeaGreen" } + ListElement { type: "InOutQuint"; ballColor: "DarkGreen" } + ListElement { type: "OutInQuint"; ballColor: "Olive" } + ListElement { type: "InSine"; ballColor: "DarkSeaGreen" } + ListElement { type: "OutSine"; ballColor: "Teal" } + ListElement { type: "InOutSine"; ballColor: "Turquoise" } + ListElement { type: "OutInSine"; ballColor: "SteelBlue" } + ListElement { type: "InExpo"; ballColor: "SkyBlue" } + ListElement { type: "OutExpo"; ballColor: "RoyalBlue" } + ListElement { type: "InOutExpo"; ballColor: "MediumBlue" } + ListElement { type: "OutInExpo"; ballColor: "MidnightBlue" } + ListElement { type: "InCirc"; ballColor: "CornSilk" } + ListElement { type: "OutCirc"; ballColor: "Bisque" } + ListElement { type: "InOutCirc"; ballColor: "RosyBrown" } + ListElement { type: "OutInCirc"; ballColor: "SandyBrown" } + ListElement { type: "InElastic"; ballColor: "DarkGoldenRod" } + ListElement { type: "OutElastic"; ballColor: "Chocolate" } + ListElement { type: "InOutElastic"; ballColor: "SaddleBrown" } + ListElement { type: "OutInElastic"; ballColor: "Brown" } + ListElement { type: "InBack"; ballColor: "Maroon" } + ListElement { type: "OutBack"; ballColor: "LavenderBlush" } + ListElement { type: "InOutBack"; ballColor: "MistyRose" } + ListElement { type: "OutInBack"; ballColor: "Gainsboro" } + ListElement { type: "OutBounce"; ballColor: "Silver" } + ListElement { type: "InBounce"; ballColor: "DimGray" } + ListElement { type: "InOutBounce"; ballColor: "SlateGray" } + ListElement { type: "OutInBounce"; ballColor: "DarkSlateGray" } } Component { @@ -80,8 +80,8 @@ Rectangle { transitions: Transition { ParallelAnimation { - NumberAnimation { properties: "x"; easing: type; duration: 1000 } - ColorAnimation { properties: "color"; easing: type; duration: 1000 } + NumberAnimation { properties: "x"; easing.type: type; duration: 1000 } + ColorAnimation { properties: "color"; easing.type: type; duration: 1000 } } } } diff --git a/examples/declarative/animations/property-animation.qml b/examples/declarative/animations/property-animation.qml index 9f76ee5..537ee26 100644 --- a/examples/declarative/animations/property-animation.qml +++ b/examples/declarative/animations/property-animation.qml @@ -45,16 +45,16 @@ Item { y: SequentialAnimation { repeat: true - // Move from minHeight to maxHeight in 300ms, using the easeOutExpo easing function + // Move from minHeight to maxHeight in 300ms, using the OutExpo easing function NumberAnimation { from: smiley.minHeight; to: smiley.maxHeight - easing: "easeOutExpo"; duration: 300 + easing.type: "OutExpo"; duration: 300 } - // Then move back to minHeight in 1 second, using the easeOutBounce easing function + // Then move back to minHeight in 1 second, using the OutBounce easing function NumberAnimation { from: smiley.maxHeight; to: smiley.minHeight - easing: "easeOutBounce"; duration: 1000 + easing.type: "OutBounce"; duration: 1000 } // Then pause for 500ms diff --git a/examples/declarative/behaviours/test.qml b/examples/declarative/behaviours/test.qml index fc3f4bf..8fffd59 100644 --- a/examples/declarative/behaviours/test.qml +++ b/examples/declarative/behaviours/test.qml @@ -64,7 +64,8 @@ Rectangle { property: "y" from: 0 to: 10 - easing: "easeOutBounce(amplitude:30)" + easing.type: "OutBounce" + easing.amplitude: 30 duration: 250 } NumberAnimation { @@ -72,7 +73,8 @@ Rectangle { property: "y" from: 10 to: 0 - easing: "easeOutBounce(amplitude:30)" + easing.type: "OutBounce" + easing.amplitude: 30 duration: 250 } } diff --git a/examples/declarative/border-image/content/MyBorderImage.qml b/examples/declarative/border-image/content/MyBorderImage.qml index a57acc7..ca886e9 100644 --- a/examples/declarative/border-image/content/MyBorderImage.qml +++ b/examples/declarative/border-image/content/MyBorderImage.qml @@ -19,14 +19,14 @@ Item { width: SequentialAnimation { repeat: true - NumberAnimation { from: container.minWidth; to: container.maxWidth; duration: 2000; easing: "easeInOutQuad"} - NumberAnimation { from: container.maxWidth; to: container.minWidth; duration: 2000; easing: "easeInOutQuad" } + NumberAnimation { from: container.minWidth; to: container.maxWidth; duration: 2000; easing.type: "InOutQuad"} + NumberAnimation { from: container.maxWidth; to: container.minWidth; duration: 2000; easing.type: "InOutQuad" } } height: SequentialAnimation { repeat: true - NumberAnimation { from: container.minHeight; to: container.maxHeight; duration: 2000; easing: "easeInOutQuad"} - NumberAnimation { from: container.maxHeight; to: container.minHeight; duration: 2000; easing: "easeInOutQuad" } + NumberAnimation { from: container.minHeight; to: container.maxHeight; duration: 2000; easing.type: "InOutQuad"} + NumberAnimation { from: container.maxHeight; to: container.minHeight; duration: 2000; easing.type: "InOutQuad" } } border.top: container.margin diff --git a/examples/declarative/connections/connections.qml b/examples/declarative/connections/connections.qml index 07f71bb..ef2cb54 100644 --- a/examples/declarative/connections/connections.qml +++ b/examples/declarative/connections/connections.qml @@ -14,7 +14,7 @@ Rectangle { Image { id: image; source: "content/bg1.jpg"; anchors.centerIn: parent; transformOrigin: Item.Center - rotation: Behavior { NumberAnimation { easing: "easeOutCubic"; duration: 300 } } + rotation: Behavior { NumberAnimation { easing.type: "OutCubic"; duration: 300 } } } Button { diff --git a/examples/declarative/fonts/hello.qml b/examples/declarative/fonts/hello.qml index c682477..fcc9580 100644 --- a/examples/declarative/fonts/hello.qml +++ b/examples/declarative/fonts/hello.qml @@ -11,7 +11,7 @@ Rectangle { font.letterSpacing: SequentialAnimation { repeat: true; - NumberAnimation { from: 100; to: 300; easing: "easeInQuad"; duration: 3000 } + NumberAnimation { from: 100; to: 300; easing.type: "InQuad"; duration: 3000 } ScriptAction { script: { container.y = (screen.height / 4) + (Math.random() * screen.height / 2) container.x = (screen.width / 4) + (Math.random() * screen.width / 2) diff --git a/examples/declarative/layouts/Button.qml b/examples/declarative/layouts/Button.qml index 0bdb9fc..7cbf68a 100644 --- a/examples/declarative/layouts/Button.qml +++ b/examples/declarative/layouts/Button.qml @@ -17,6 +17,6 @@ Rectangle { border.color: "black"; color: "steelblue"; radius: 5; width: pix.wid transitions: Transition{ - NumberAnimation { properties:"x,left"; easing:"easeInOutQuad"; duration:200 } + NumberAnimation { properties:"x,left"; easing.type:"InOutQuad"; duration:200 } } } diff --git a/examples/declarative/layouts/positioners.qml b/examples/declarative/layouts/positioners.qml index fefd964..7146702 100644 --- a/examples/declarative/layouts/positioners.qml +++ b/examples/declarative/layouts/positioners.qml @@ -11,12 +11,12 @@ Rectangle { y: 0 move: Transition { NumberAnimation { - properties: "y"; easing: "easeOutBounce" + properties: "y"; easing.type: "OutBounce" } } add: Transition { NumberAnimation { - properties: "y"; easing: "easeOutQuad" + properties: "y"; easing.type: "OutQuad" } } Rectangle { color: "red"; width: 100; height: 50; border.color: "black"; radius: 15 } @@ -35,12 +35,12 @@ Rectangle { y: 300 move: Transition { NumberAnimation { - properties: "x"; easing: "easeOutBounce" + properties: "x"; easing.type: "OutBounce" } } add: Transition { NumberAnimation { - properties: "x"; easing: "easeOutQuad" + properties: "x"; easing.type: "OutQuad" } } Rectangle { color: "red"; width: 50; height: 100; border.color: "black"; radius: 15 } @@ -101,13 +101,13 @@ Rectangle { move: Transition { NumberAnimation { - properties: "x,y"; easing: "easeOutBounce" + properties: "x,y"; easing.type: "OutBounce" } } add: Transition { NumberAnimation { - properties: "x,y"; easing: "easeOutBounce" + properties: "x,y"; easing.type: "OutBounce" } } @@ -136,13 +136,13 @@ Rectangle { move: Transition { NumberAnimation { - properties: "x,y"; easing: "easeOutBounce" + properties: "x,y"; easing.type: "OutBounce" } } add: Transition { NumberAnimation { - properties: "x,y"; easing: "easeOutBounce" + properties: "x,y"; easing.type: "OutBounce" } } Rectangle { color: "red"; width: 50; height: 50; border.color: "black"; radius: 15 } diff --git a/examples/declarative/parallax/qml/Smiley.qml b/examples/declarative/parallax/qml/Smiley.qml index fc5b4fe..81eadda 100644 --- a/examples/declarative/parallax/qml/Smiley.qml +++ b/examples/declarative/parallax/qml/Smiley.qml @@ -27,16 +27,16 @@ Item { y: SequentialAnimation { repeat: true - // Move from minHeight to maxHeight in 300ms, using the easeOutExpo easing function + // Move from minHeight to maxHeight in 300ms, using the OutExpo easing function NumberAnimation { from: smiley.minHeight; to: smiley.maxHeight - easing: "easeOutExpo"; duration: 300 + easing.type: "OutExpo"; duration: 300 } - // Then move back to minHeight in 1 second, using the easeOutBounce easing function + // Then move back to minHeight in 1 second, using the OutBounce easing function NumberAnimation { from: smiley.maxHeight; to: smiley.minHeight - easing: "easeOutBounce"; duration: 1000 + easing.type: "OutBounce"; duration: 1000 } // Then pause for 500ms diff --git a/examples/declarative/slideswitch/content/Switch.qml b/examples/declarative/slideswitch/content/Switch.qml index 930f471..758aee6 100644 --- a/examples/declarative/slideswitch/content/Switch.qml +++ b/examples/declarative/slideswitch/content/Switch.qml @@ -66,7 +66,7 @@ Item { //![7] transitions: Transition { - NumberAnimation { properties: "x"; easing: "easeInOutQuad"; duration: 200 } + NumberAnimation { properties: "x"; easing.type: "InOutQuad"; duration: 200 } } //![7] } diff --git a/examples/declarative/states/transitions.qml b/examples/declarative/states/transitions.qml index 48d5f60..8ad61ad 100644 --- a/examples/declarative/states/transitions.qml +++ b/examples/declarative/states/transitions.qml @@ -51,16 +51,16 @@ Rectangle { // transitions define how the properties change. transitions: [ // When transitioning to 'Position1' move x,y over a duration of 1 second, - // with easeOutBounce easing function. + // with OutBounce easing function. Transition { from: "*"; to: "Position1" - NumberAnimation { properties: "x,y"; easing: "easeOutBounce"; duration: 1000 } + NumberAnimation { properties: "x,y"; easing.type: "OutBounce"; duration: 1000 } }, // When transitioning to 'Position2' move x,y over a duration of 2 seconds, - // with easeInOutQuad easing function. + // with InOutQuad easing function. Transition { from: "*"; to: "Position2" - NumberAnimation { properties: "x,y"; easing: "easeInOutQuad"; duration: 2000 } + NumberAnimation { properties: "x,y"; easing.type: "InOutQuad"; duration: 2000 } }, // For any other state changes move x,y linearly over duration of 200ms. Transition { diff --git a/examples/declarative/tutorials/helloworld/tutorial3.qml b/examples/declarative/tutorials/helloworld/tutorial3.qml index 9eaa009..b8a4f77 100644 --- a/examples/declarative/tutorials/helloworld/tutorial3.qml +++ b/examples/declarative/tutorials/helloworld/tutorial3.qml @@ -28,7 +28,7 @@ Rectangle { transitions: Transition { from: ""; to: "down"; reversible: true ParallelAnimation { - NumberAnimation { properties: "y,rotation"; duration: 500; easing: "easeInOutQuad" } + NumberAnimation { properties: "y,rotation"; duration: 500; easing.type: "InOutQuad" } ColorAnimation { duration: 500 } } } diff --git a/examples/declarative/xmldata/yahoonews.qml b/examples/declarative/xmldata/yahoonews.qml index b80e29c..f7c269c 100644 --- a/examples/declarative/xmldata/yahoonews.qml +++ b/examples/declarative/xmldata/yahoonews.qml @@ -61,7 +61,7 @@ Rectangle { transitions: Transition { from: "*"; to: "Details"; reversible: true SequentialAnimation { - NumberAnimation { duration: 200; properties: "height"; easing: "easeOutQuad" } + NumberAnimation { duration: 200; properties: "height"; easing.type: "OutQuad" } NumberAnimation { duration: 200; properties: "opacity" } } } |