summaryrefslogtreecommitdiffstats
path: root/examples/declarative/tvtennis/tvtennis.qml
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@nokia.com>2010-05-12 07:42:52 (GMT)
committerMorten Johan Sørvig <morten.sorvig@nokia.com>2010-05-12 07:42:52 (GMT)
commit731a2f16578ead0f75f2752e757b138376b2f872 (patch)
tree2b6f9746771992f97cbdb5cf5af8f35ac6928b26 /examples/declarative/tvtennis/tvtennis.qml
parent37475bcc4aef3f08c5917f22c7f0f427e4214b91 (diff)
parentb4c589868f278aa9a58ab9afa727dbf0a9442e22 (diff)
downloadQt-731a2f16578ead0f75f2752e757b138376b2f872.zip
Qt-731a2f16578ead0f75f2752e757b138376b2f872.tar.gz
Qt-731a2f16578ead0f75f2752e757b138376b2f872.tar.bz2
Merge remote branch 'mainline/4.7' into 4.7
Conflicts: src/declarative/qml/qdeclarativeengine.cpp tools/qdoc3/htmlgenerator.cpp
Diffstat (limited to 'examples/declarative/tvtennis/tvtennis.qml')
-rw-r--r--examples/declarative/tvtennis/tvtennis.qml8
1 files changed, 0 insertions, 8 deletions
diff --git a/examples/declarative/tvtennis/tvtennis.qml b/examples/declarative/tvtennis/tvtennis.qml
index 354a16f..c90d9c5 100644
--- a/examples/declarative/tvtennis/tvtennis.qml
+++ b/examples/declarative/tvtennis/tvtennis.qml
@@ -1,5 +1,4 @@
import Qt 4.7
-import Qt.multimedia 4.7
Rectangle {
id: page
@@ -17,17 +16,12 @@ Rectangle {
x: 20; width: 20; height: 20; z: 1
color: "Lime"
- SoundEffect { id: paddle; source: "paddle.wav" }
- SoundEffect { id: wall; source: "click.wav" }
-
// Move the ball to the right and back to the left repeatedly
SequentialAnimation on x {
loops: Animation.Infinite
NumberAnimation { to: page.width - 40; duration: 2000 }
- ScriptAction { script: paddle.play() }
PropertyAction { target: ball; property: "direction"; value: "left" }
NumberAnimation { to: 20; duration: 2000 }
- ScriptAction { script: paddle.play() }
PropertyAction { target: ball; property: "direction"; value: "right" }
}
@@ -37,10 +31,8 @@ Rectangle {
// Detect the ball hitting the top or bottom of the view and bounce it
onYChanged: {
if (y <= 0) {
- wall.play();
targetY = page.height - 20;
} else if (y >= page.height - 20) {
- wall.play();
targetY = 0;
}
}