summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2010-03-25 00:09:17 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2010-03-25 00:09:17 (GMT)
commit13d9f49577dd5be8c01792b6d7709c2e9b28aa95 (patch)
tree158d3b0c437fb88a6f103602f1e392c332bb7a0e /examples
parent668c9d63d27b2a925c18f3128747c20b37560569 (diff)
downloadQt-13d9f49577dd5be8c01792b6d7709c2e9b28aa95.zip
Qt-13d9f49577dd5be8c01792b6d7709c2e9b28aa95.tar.gz
Qt-13d9f49577dd5be8c01792b6d7709c2e9b28aa95.tar.bz2
Replace Animation's repeat property with loops.
You can now loop a fixed number of times as well as forever. The old repeat behavior (loop forever) can be acheived with loops: Qt.Infinite.
Diffstat (limited to 'examples')
-rw-r--r--examples/declarative/animations/color-animation.qml10
-rw-r--r--examples/declarative/animations/property-animation.qml2
-rw-r--r--examples/declarative/border-image/content/MyBorderImage.qml4
-rw-r--r--examples/declarative/effects/effects.qml4
-rw-r--r--examples/declarative/fillmode/fillmode.qml2
-rw-r--r--examples/declarative/fonts/banner.qml2
-rw-r--r--examples/declarative/fonts/hello.qml4
-rw-r--r--examples/declarative/listview/content/ClickAutoRepeating.qml2
-rw-r--r--examples/declarative/parallax/qml/Smiley.qml2
-rw-r--r--examples/declarative/progressbar/progressbars.qml6
-rw-r--r--examples/declarative/tvtennis/tvtennis.qml2
-rw-r--r--examples/declarative/webview/content/SpinSquare.qml2
12 files changed, 21 insertions, 21 deletions
diff --git a/examples/declarative/animations/color-animation.qml b/examples/declarative/animations/color-animation.qml
index 025134b..5d313c1 100644
--- a/examples/declarative/animations/color-animation.qml
+++ b/examples/declarative/animations/color-animation.qml
@@ -12,7 +12,7 @@ Item {
GradientStop {
position: 0.0
SequentialAnimation on color {
- repeat: true
+ loops: Qt.Infinite
ColorAnimation { from: "DeepSkyBlue"; to: "#0E1533"; duration: 5000 }
ColorAnimation { from: "#0E1533"; to: "DeepSkyBlue"; duration: 5000 }
}
@@ -20,7 +20,7 @@ Item {
GradientStop {
position: 1.0
SequentialAnimation on color {
- repeat: true
+ loops: Qt.Infinite
ColorAnimation { from: "SkyBlue"; to: "#437284"; duration: 5000 }
ColorAnimation { from: "#437284"; to: "SkyBlue"; duration: 5000 }
}
@@ -32,7 +32,7 @@ Item {
Item {
width: parent.width; height: 2 * parent.height
transformOrigin: Item.Center
- NumberAnimation on rotation { from: 0; to: 360; duration: 10000; repeat: true }
+ NumberAnimation on rotation { from: 0; to: 360; duration: 10000; loops: Qt.Infinite }
Image {
source: "images/sun.png"; y: 10; anchors.horizontalCenter: parent.horizontalCenter
transformOrigin: Item.Center; rotation: -3 * parent.rotation
@@ -46,7 +46,7 @@ Item {
source: "images/star.png"; angleDeviation: 360; velocity: 0
velocityDeviation: 0; count: parent.width / 10; fadeInDuration: 2800
SequentialAnimation on opacity {
- repeat: true
+ loops: Qt.Infinite
NumberAnimation { from: 0; to: 1; duration: 5000 }
NumberAnimation { from: 1; to: 0; duration: 5000 }
}
@@ -60,7 +60,7 @@ Item {
GradientStop {
position: 0.0
SequentialAnimation on color {
- repeat: true
+ loops: Qt.Infinite
ColorAnimation { from: "ForestGreen"; to: "#001600"; duration: 5000 }
ColorAnimation { from: "#001600"; to: "ForestGreen"; duration: 5000 }
}
diff --git a/examples/declarative/animations/property-animation.qml b/examples/declarative/animations/property-animation.qml
index 4428f34..d33b55d 100644
--- a/examples/declarative/animations/property-animation.qml
+++ b/examples/declarative/animations/property-animation.qml
@@ -43,7 +43,7 @@ Item {
// Animate the y property. Setting repeat to true makes the
// animation repeat indefinitely, otherwise it would only run once.
SequentialAnimation on y {
- repeat: true
+ loops: Qt.Infinite
// Move from minHeight to maxHeight in 300ms, using the OutExpo easing function
NumberAnimation {
diff --git a/examples/declarative/border-image/content/MyBorderImage.qml b/examples/declarative/border-image/content/MyBorderImage.qml
index 5621e18..bd0f5fb 100644
--- a/examples/declarative/border-image/content/MyBorderImage.qml
+++ b/examples/declarative/border-image/content/MyBorderImage.qml
@@ -18,13 +18,13 @@ Item {
id: image; x: container.width / 2 - width / 2; y: container.height / 2 - height / 2
SequentialAnimation on width {
- repeat: true
+ loops: Qt.Infinite
NumberAnimation { from: container.minWidth; to: container.maxWidth; duration: 2000; easing.type: "InOutQuad"}
NumberAnimation { from: container.maxWidth; to: container.minWidth; duration: 2000; easing.type: "InOutQuad" }
}
SequentialAnimation on height {
- repeat: true
+ loops: Qt.Infinite
NumberAnimation { from: container.minHeight; to: container.maxHeight; duration: 2000; easing.type: "InOutQuad"}
NumberAnimation { from: container.maxHeight; to: container.minHeight; duration: 2000; easing.type: "InOutQuad" }
}
diff --git a/examples/declarative/effects/effects.qml b/examples/declarative/effects/effects.qml
index 997d7de..45246a9 100644
--- a/examples/declarative/effects/effects.qml
+++ b/examples/declarative/effects/effects.qml
@@ -16,7 +16,7 @@ Rectangle {
running: false
from: 0; to: 10
duration: 1000
- repeat: true
+ loops: Qt.Infinite
}
}
@@ -33,7 +33,7 @@ Rectangle {
effect: DropShadow {
blurRadius: 3
offset.x: 3
- NumberAnimation on offset.y { id: dropShadowEffect; from: 0; to: 10; duration: 1000; running: false; repeat: true; }
+ NumberAnimation on offset.y { id: dropShadowEffect; from: 0; to: 10; duration: 1000; running: false; loops: Qt.Infinite; }
}
MouseArea { anchors.fill: parent; onClicked: dropShadowEffect.running = !dropShadowEffect.running }
diff --git a/examples/declarative/fillmode/fillmode.qml b/examples/declarative/fillmode/fillmode.qml
index ab0f81c..effb964 100644
--- a/examples/declarative/fillmode/fillmode.qml
+++ b/examples/declarative/fillmode/fillmode.qml
@@ -5,7 +5,7 @@ Image {
height: 250
source: "face.png"
SequentialAnimation on fillMode {
- repeat: true
+ loops: Qt.Infinite
PropertyAction { value: Image.Stretch }
PropertyAction { target: label; property: "text"; value: "Stretch" }
PauseAnimation { duration: 1000 }
diff --git a/examples/declarative/fonts/banner.qml b/examples/declarative/fonts/banner.qml
index 7989f80..bb4fe24 100644
--- a/examples/declarative/fonts/banner.qml
+++ b/examples/declarative/fonts/banner.qml
@@ -10,7 +10,7 @@ Rectangle {
Row {
y: -screen.height / 4.5
- NumberAnimation on x { from: 0; to: -text.width; duration: 6000; repeat: true }
+ NumberAnimation on x { from: 0; to: -text.width; duration: 6000; loops: Qt.Infinite }
Text { id: text; font.pixelSize: screen.pixelSize; color: screen.textColor; text: screen.text }
Text { font.pixelSize: screen.pixelSize; color: screen.textColor; text: screen.text }
Text { font.pixelSize: screen.pixelSize; color: screen.textColor; text: screen.text }
diff --git a/examples/declarative/fonts/hello.qml b/examples/declarative/fonts/hello.qml
index 334409e..f703167 100644
--- a/examples/declarative/fonts/hello.qml
+++ b/examples/declarative/fonts/hello.qml
@@ -10,7 +10,7 @@ Rectangle {
text: "Hello world!"; font.pixelSize: 60
SequentialAnimation on font.letterSpacing {
- repeat: true;
+ loops: Qt.Infinite;
NumberAnimation { from: 100; to: 300; easing.type: "InQuad"; duration: 3000 }
ScriptAction { script: {
container.y = (screen.height / 4) + (Math.random() * screen.height / 2)
@@ -18,7 +18,7 @@ Rectangle {
} }
}
SequentialAnimation on opacity {
- repeat: true;
+ loops: Qt.Infinite;
NumberAnimation { from: 1; to: 0; duration: 2600 }
PauseAnimation { duration: 400 }
}
diff --git a/examples/declarative/listview/content/ClickAutoRepeating.qml b/examples/declarative/listview/content/ClickAutoRepeating.qml
index 5240e65..8ef4a52 100644
--- a/examples/declarative/listview/content/ClickAutoRepeating.qml
+++ b/examples/declarative/listview/content/ClickAutoRepeating.qml
@@ -18,7 +18,7 @@ Item {
ScriptAction { script: page.clicked() }
PauseAnimation { duration: repeatdelay }
SequentialAnimation {
- repeat: true
+ loops: Qt.Infinite
ScriptAction { script: page.clicked() }
PauseAnimation { duration: repeatperiod }
}
diff --git a/examples/declarative/parallax/qml/Smiley.qml b/examples/declarative/parallax/qml/Smiley.qml
index 4442d5e..75302a3 100644
--- a/examples/declarative/parallax/qml/Smiley.qml
+++ b/examples/declarative/parallax/qml/Smiley.qml
@@ -25,7 +25,7 @@ Item {
// Animate the y property. Setting repeat to true makes the
// animation repeat indefinitely, otherwise it would only run once.
SequentialAnimation on y {
- repeat: true
+ loops: Qt.Infinite
// Move from minHeight to maxHeight in 300ms, using the OutExpo easing function
NumberAnimation {
diff --git a/examples/declarative/progressbar/progressbars.qml b/examples/declarative/progressbar/progressbars.qml
index a66d544..ced3ccd 100644
--- a/examples/declarative/progressbar/progressbars.qml
+++ b/examples/declarative/progressbar/progressbars.qml
@@ -14,9 +14,9 @@ Rectangle {
ProgressBar {
property int r: Math.floor(Math.random() * 5000 + 1000)
width: main.width - 20
- NumberAnimation on value { duration: r; from: 0; to: 100; repeat: true }
- ColorAnimation on color { duration: r; from: "lightsteelblue"; to: "thistle"; repeat: true }
- ColorAnimation on secondColor { duration: r; from: "steelblue"; to: "#CD96CD"; repeat: true }
+ NumberAnimation on value { duration: r; from: 0; to: 100; loops: Qt.Infinite }
+ ColorAnimation on color { duration: r; from: "lightsteelblue"; to: "thistle"; loops: Qt.Infinite }
+ ColorAnimation on secondColor { duration: r; from: "steelblue"; to: "#CD96CD"; loops: Qt.Infinite }
}
}
}
diff --git a/examples/declarative/tvtennis/tvtennis.qml b/examples/declarative/tvtennis/tvtennis.qml
index 6022a15..138d587 100644
--- a/examples/declarative/tvtennis/tvtennis.qml
+++ b/examples/declarative/tvtennis/tvtennis.qml
@@ -21,7 +21,7 @@ Rectangle {
// Move the ball to the right and back to the left repeatedly
SequentialAnimation on x {
- repeat: true
+ loops: Qt.Infinite
NumberAnimation { to: page.width - 40; duration: 2000 }
ScriptAction { script: paddle.play() }
PropertyAction { target: ball; property: "direction"; value: "left" }
diff --git a/examples/declarative/webview/content/SpinSquare.qml b/examples/declarative/webview/content/SpinSquare.qml
index b65a29d..b0f568f 100644
--- a/examples/declarative/webview/content/SpinSquare.qml
+++ b/examples/declarative/webview/content/SpinSquare.qml
@@ -18,7 +18,7 @@ Item {
NumberAnimation on rotation {
from: 0
to: 360
- repeat: true
+ loops: Qt.Infinite
duration: root.period
}
}