summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authordpope <daniel.pope@nokia.com>2012-06-08 13:57:58 +1000
committerQt by Nokia <qt-info@nokia.com>2012-06-12 02:49:44 +0200
commit2aa356929cdd1927ed19b7e6ca96cfba2050a484 (patch)
treebbc0411ea912553222121dc30f6d69fcaa5970d3 /demos
parentd3dd8edb129f12aab8ea08f4e6878179f260ace9 (diff)
Modifications to stop animations/timers in idle mode.
Task-number: QTBUG-26071 Change-Id: Ida93554729e49638b91b2cb6bb3df61677d2a9b1 Reviewed-by: Sergey Dubitskiy <sergey.dubitskiy@nokia.com>
Diffstat (limited to 'demos')
-rw-r--r--demos/quick3d/flickr3d/qml/Flickr3d.qml2
-rw-r--r--demos/quick3d/robo_bounce/qml/PushButton.qml2
-rw-r--r--demos/quick3d/robo_bounce/qml/RoboBounce.qml20
-rw-r--r--demos/quick3d/tea_service/qml/TeaService.qml2
4 files changed, 9 insertions, 17 deletions
diff --git a/demos/quick3d/flickr3d/qml/Flickr3d.qml b/demos/quick3d/flickr3d/qml/Flickr3d.qml
index 7d077f863..91eb898cb 100644
--- a/demos/quick3d/flickr3d/qml/Flickr3d.qml
+++ b/demos/quick3d/flickr3d/qml/Flickr3d.qml
@@ -54,7 +54,7 @@ Viewport {
}
NumberAnimation {
- running: true
+ running: Qt.application.active
target: cam; property: "viewAngle";
from: 0.0; to: 360.0; duration: 2000000;
loops: Animation.Infinite
diff --git a/demos/quick3d/robo_bounce/qml/PushButton.qml b/demos/quick3d/robo_bounce/qml/PushButton.qml
index 5f70888eb..0150dfb76 100644
--- a/demos/quick3d/robo_bounce/qml/PushButton.qml
+++ b/demos/quick3d/robo_bounce/qml/PushButton.qml
@@ -52,7 +52,7 @@ Image {
signal pressed
SequentialAnimation {
- running: theButton.bounce
+ running: theButton.bounce && Qt.application.active
NumberAnimation {target: theButton; property: "scale"; duration: 50; to: 0.8;}
NumberAnimation {target: theButton; property: "scale"; duration: 50; to: 1;}
onCompleted: {theButton.bounce = false}
diff --git a/demos/quick3d/robo_bounce/qml/RoboBounce.qml b/demos/quick3d/robo_bounce/qml/RoboBounce.qml
index 336259626..48f04551a 100644
--- a/demos/quick3d/robo_bounce/qml/RoboBounce.qml
+++ b/demos/quick3d/robo_bounce/qml/RoboBounce.qml
@@ -116,7 +116,7 @@ Image {
Timer {
id: navigator;
interval: 5;
- running: true
+ running: Qt.application.active
repeat: true
property int tiltdir: 0 //1 is forward, 2 is back
property int spindir: 0 //1 is right, 2 is left
@@ -144,7 +144,7 @@ Image {
Timer {
id: heartbeat;
interval: theBackground.repeatAnimationTimer*1000;
- running: true
+ running: Qt.application.active
repeat: true
onTriggered: {
qt3dButton.bounce = true;
@@ -265,7 +265,7 @@ Image {
}
SequentialAnimation {
- running: roboInfo.showVisible
+ running: roboInfo.showVisible && Qt.application.active
NumberAnimation {target: roboInfo; property: "opacity"; to: 0.7; duration: 500}
PauseAnimation {duration: 3000}
NumberAnimation {target: roboInfo; property: "opacity"; to: 0.0; duration: 500}
@@ -288,7 +288,7 @@ Image {
height: 70
SequentialAnimation {
- running: qt3dButton.bounce
+ running: qt3dButton.bounce && Qt.application.active
NumberAnimation {target: qt3dButton; property: "scale"; duration: 100; to: 1.2;}
NumberAnimation {target: qt3dButton; property: "scale"; duration: 100; to: 1;}
onCompleted: {qt3dButton.bounce = false}
@@ -433,7 +433,7 @@ Image {
NumberAnimation {
- running: room.spinning
+ running: room.spinning && Qt.application.active
target: roomSpin
property: "angle"
to: 360
@@ -461,7 +461,7 @@ Image {
]
SequentialAnimation {
- running: smallCube.fallingCubeAnimation
+ running: smallCube.fallingCubeAnimation && Qt.application.active
onCompleted: {smallCube.fallingCubeAnimation=false;}
ParallelAnimation {
NumberAnimation {target: spinSmallCube; property: "angle"; to: 360; easing.type: "InOutQuad"; duration: 1750}
@@ -583,14 +583,6 @@ Image {
mesh: Mesh { source: "meshes/roboticArms.3ds"}
transform: Rotation3D{id: armBend; angle: -90;axis: Qt.vector3d(0,1,0)}
position: Qt.vector3d(.18, 0,-5.4)
-
- SequentialAnimation {
- running: false
- loops: 100
- NumberAnimation {target: armBend; property: "angle"; to: 0.0; duration: 1000; easing.type: "OutQuad" }
- PauseAnimation {duration: 1000}
- NumberAnimation {target: armBend; property: "angle"; to: -90.0; duration: 1000; easing.type: "OutQuad" }
- }
}
Item3D {
diff --git a/demos/quick3d/tea_service/qml/TeaService.qml b/demos/quick3d/tea_service/qml/TeaService.qml
index fad643fd8..3f39b4040 100644
--- a/demos/quick3d/tea_service/qml/TeaService.qml
+++ b/demos/quick3d/tea_service/qml/TeaService.qml
@@ -147,7 +147,7 @@ Viewport {
}
SequentialAnimation on y{
- running: teapot.bounce
+ running: teapot.bounce && Qt.application.active
NumberAnimation { to : 1.0; duration: 300; easing.type: "OutQuad" }
NumberAnimation { to : 0.0; duration: 300; easing.type: "OutBounce" }
onCompleted: teapot.bounce = false