summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-02-25 05:51:22 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-02-25 05:51:22 (GMT)
commitb915bc2d710e365e7c9083ba65d08de08ea02f74 (patch)
tree8e87760b9154493372f1f8b499b52e661547e3ca /examples
parent950f3849e3bd2edd6bcc2784dbeadcb604c38e2d (diff)
parentd022acd47350f61d3959b076d7bc92df86015b16 (diff)
downloadQt-b915bc2d710e365e7c9083ba65d08de08ea02f74.zip
Qt-b915bc2d710e365e7c9083ba65d08de08ea02f74.tar.gz
Qt-b915bc2d710e365e7c9083ba65d08de08ea02f74.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-qml
Diffstat (limited to 'examples')
-rw-r--r--examples/declarative/connections/connections.qml12
1 files changed, 4 insertions, 8 deletions
diff --git a/examples/declarative/connections/connections.qml b/examples/declarative/connections/connections.qml
index ef2cb54..c140017 100644
--- a/examples/declarative/connections/connections.qml
+++ b/examples/declarative/connections/connections.qml
@@ -5,15 +5,11 @@ Rectangle {
id: window; color: "#646464"
width: 640; height: 480
- function turnLeft() {
- image.rotation -= 90
- }
- function turnRight() {
- image.rotation += 90
- }
+ property int angle: 0
Image {
id: image; source: "content/bg1.jpg"; anchors.centerIn: parent; transformOrigin: Item.Center
+ rotation: window.angle
rotation: Behavior { NumberAnimation { easing.type: "OutCubic"; duration: 300 } }
}
@@ -26,6 +22,6 @@ Rectangle {
anchors { right: parent.right; bottom: parent.bottom; rightMargin: 10; bottomMargin: 10 }
}
- Connection { sender: leftButton; signal: "clicked()"; script: window.turnLeft() }
- Connection { sender: rightButton; signal: "clicked()"; script: window.turnRight() }
+ Connection { sender: leftButton; signal: "clicked()"; script: window.angle -= 90 }
+ Connection { sender: rightButton; signal: "clicked()"; script: window.angle += 90 }
}