summaryrefslogtreecommitdiffstats
path: root/examples/declarative/tvtennis
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-03-02 00:47:10 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-03-02 00:47:10 (GMT)
commit2790cb59f6877c1027c833578b72e168c912758a (patch)
treeb626316b5801ba887b48e9fe71f811f4cf4ec581 /examples/declarative/tvtennis
parentf800919c4336da77b73561cc5180fc167f61f435 (diff)
downloadQt-2790cb59f6877c1027c833578b72e168c912758a.zip
Qt-2790cb59f6877c1027c833578b72e168c912758a.tar.gz
Qt-2790cb59f6877c1027c833578b72e168c912758a.tar.bz2
Make "on" syntax mandatory for value sources and interceptors
Where you would have written x: NumberAnimation {} y: Behavior {} you now must write NumberAnimation on x {} Behavior on y {} This change also makes the parser more strict with respect to multiple assignments to a single property - they're no longer allowed. For example this x: 10 x: 11 is now an error.
Diffstat (limited to 'examples/declarative/tvtennis')
-rw-r--r--examples/declarative/tvtennis/tvtennis.qml8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/declarative/tvtennis/tvtennis.qml b/examples/declarative/tvtennis/tvtennis.qml
index 4bd5319..1585c7b 100644
--- a/examples/declarative/tvtennis/tvtennis.qml
+++ b/examples/declarative/tvtennis/tvtennis.qml
@@ -16,7 +16,7 @@ Rectangle {
x: 20; width: 20; height: 20; z: 1
// Move the ball to the right and back to the left repeatedly
- x: SequentialAnimation {
+ SequentialAnimation on x {
repeat: true
NumberAnimation { to: page.width - 40; duration: 2000 }
ScriptAction { script: Qt.playSound('paddle.wav') }
@@ -27,7 +27,7 @@ Rectangle {
}
// Make y follow the target y coordinate, with a velocity of 200
- y: SpringFollow { source: ball.targetY; velocity: 200 }
+ SpringFollow on y { source: ball.targetY; velocity: 200 }
// Detect the ball hitting the top or bottom of the view and bounce it
onYChanged: {
@@ -47,7 +47,7 @@ Rectangle {
id: leftBat
color: "Lime"
x: 2; width: 20; height: 90
- y: SpringFollow {
+ SpringFollow on y {
source: ball.y - 45; velocity: 300
enabled: ball.direction == 'left'
}
@@ -56,7 +56,7 @@ Rectangle {
id: rightBat
color: "Lime"
x: page.width - 22; width: 20; height: 90
- y: SpringFollow {
+ SpringFollow on y {
source: ball.y-45; velocity: 300
enabled: ball.direction == 'right'
}