diff options
author | Yann Bodson <yann.bodson@nokia.com> | 2010-03-18 04:25:36 (GMT) |
---|---|---|
committer | Yann Bodson <yann.bodson@nokia.com> | 2010-03-18 04:39:44 (GMT) |
commit | b440beba19519e9211752656fdfeda250a35c81f (patch) | |
tree | 611a99e0f138903a12d49ba79fd5c69b790fa5b6 /examples/declarative/connections/connections-example.qml | |
parent | 8bcae7dd3f9138030c6ac27868ca8574f03f4d31 (diff) | |
download | Qt-b440beba19519e9211752656fdfeda250a35c81f.zip Qt-b440beba19519e9211752656fdfeda250a35c81f.tar.gz Qt-b440beba19519e9211752656fdfeda250a35c81f.tar.bz2 |
Fix examples after 47fb07c9fdf47584ae55f3412102bbeef5576b04.
Diffstat (limited to 'examples/declarative/connections/connections-example.qml')
-rw-r--r-- | examples/declarative/connections/connections-example.qml | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/examples/declarative/connections/connections-example.qml b/examples/declarative/connections/connections-example.qml new file mode 100644 index 0000000..c35bda5 --- /dev/null +++ b/examples/declarative/connections/connections-example.qml @@ -0,0 +1,27 @@ +import Qt 4.6 +import "content" + +Rectangle { + id: window; color: "#646464" + width: 640; height: 480 + + property int angle: 0 + + Image { + id: image; source: "content/bg1.jpg"; anchors.centerIn: parent; transformOrigin: Item.Center + rotation: window.angle + Behavior on rotation { NumberAnimation { easing.type: "OutCubic"; duration: 300 } } + } + + Button { + id: leftButton; image: "content/rotate-left.png" + anchors { left: parent.left; bottom: parent.bottom; leftMargin: 10; bottomMargin: 10 } + } + Button { + id: rightButton; image: "content/rotate-right.png" + anchors { right: parent.right; bottom: parent.bottom; rightMargin: 10; bottomMargin: 10 } + } + + Connections { target: leftButton; onClicked: window.angle -= 90 } + Connections { target: rightButton; onClicked: window.angle += 90 } +} |