diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2010-03-31 01:54:29 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2010-03-31 01:54:29 (GMT) |
commit | 67667a5fee2f3c693e29e7c57b73fc8a6a508d01 (patch) | |
tree | cafd23c181d8dcfd5a5f62cc6479bce863dfcfd9 /examples | |
parent | e479a0468eb5e3a57d1f20f423c60894d7a1a7a3 (diff) | |
parent | 3b1e8bf54eeb0050f55720ffc90a2b77a73ca4df (diff) | |
download | Qt-67667a5fee2f3c693e29e7c57b73fc8a6a508d01.zip Qt-67667a5fee2f3c693e29e7c57b73fc8a6a508d01.tar.gz Qt-67667a5fee2f3c693e29e7c57b73fc8a6a508d01.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'examples')
-rw-r--r-- | examples/declarative/animations/property-animation.qml | 4 | ||||
-rw-r--r-- | examples/declarative/behaviors/SideRect.qml (renamed from examples/declarative/behaviours/SideRect.qml) | 7 | ||||
-rw-r--r-- | examples/declarative/behaviors/behavior-example.qml (renamed from examples/declarative/behaviours/behavior-example.qml) | 45 | ||||
-rw-r--r-- | examples/declarative/declarative.pro | 2 | ||||
-rw-r--r-- | examples/symbianpkgrules.pri | 3 |
5 files changed, 34 insertions, 27 deletions
diff --git a/examples/declarative/animations/property-animation.qml b/examples/declarative/animations/property-animation.qml index 401feb5..fd5eb3c 100644 --- a/examples/declarative/animations/property-animation.qml +++ b/examples/declarative/animations/property-animation.qml @@ -40,7 +40,7 @@ Item { anchors.horizontalCenter: parent.horizontalCenter source: "images/face-smile.png"; y: minHeight - // Animate the y property. Setting repeat to true makes the + // Animate the y property. Setting loops to Animation.Infinite makes the // animation repeat indefinitely, otherwise it would only run once. SequentialAnimation on y { loops: Animation.Infinite @@ -50,7 +50,7 @@ Item { from: smiley.minHeight; to: smiley.maxHeight easing.type: "OutExpo"; duration: 300 } - + // Then move back to minHeight in 1 second, using the OutBounce easing function NumberAnimation { from: smiley.maxHeight; to: smiley.minHeight diff --git a/examples/declarative/behaviours/SideRect.qml b/examples/declarative/behaviors/SideRect.qml index 63b7db2..7caac45 100644 --- a/examples/declarative/behaviours/SideRect.qml +++ b/examples/declarative/behaviors/SideRect.qml @@ -5,10 +5,9 @@ Rectangle { property string text - color: "black" - width: 75; height: 50 - radius: 5 - border.width: 10; border.color: "white"; + width: 75; height: 50; radius: 6 + color: "#646464"; border.width: 4; border.color: "white" + MouseArea { anchors.fill: parent hoverEnabled: true diff --git a/examples/declarative/behaviours/behavior-example.qml b/examples/declarative/behaviors/behavior-example.qml index c84bf62..8da1ada 100644 --- a/examples/declarative/behaviours/behavior-example.qml +++ b/examples/declarative/behaviors/behavior-example.qml @@ -1,15 +1,14 @@ import Qt 4.6 Rectangle { - color: "black" - width: 400; height: 400 + color: "#343434" + width: 600; height: 400 Rectangle { - color: "transparent" anchors.centerIn: parent - width: 200; height: 200 - radius: 30 - border.width: 10; border.color: "white"; + width: 200; height: 200; radius: 30 + color: "transparent"; border.width: 4; border.color: "white" + SideRect { id: leftRect @@ -45,27 +44,35 @@ Rectangle { property string text - color: "red" - width: 75; height: 50 - radius: 5 - border.width: 10; border.color: "white"; - x: 100-37; y: 100-25 - Behavior on x { NumberAnimation { duration: 300 } } - Behavior on y { NumberAnimation { duration: 300 } } + color: "firebrick" + x: 62.5; y: 75; width: 75; height: 50 + radius: 6; border.width: 4; border.color: "white" + + // Setting an 'elastic' behavior on the focusRect's x property. + Behavior on x { + NumberAnimation { easing.type: "OutElastic"; easing.amplitude: 3.0; easing.period: 2.0; duration: 300 } + } + + // Setting an 'elastic' behavior on the focusRect's y property. + Behavior on y { + NumberAnimation { easing.type: "OutElastic"; easing.amplitude: 3.0; easing.period: 2.0; duration: 300 } + } + Text { id: focusText - text: focusRect.text; + text: focusRect.text + anchors.centerIn: parent + color: "white"; font.pixelSize: 16; font.bold: true + + // Setting a behavior on the focusText's x property: + // Set the opacity to 0, set the new text value, then set the opacity back to 1. Behavior on text { SequentialAnimation { NumberAnimation { target: focusText; property: "opacity"; to: 0; duration: 150 } - PropertyAction {} + PropertyAction { } NumberAnimation { target: focusText; property: "opacity"; to: 1; duration: 150 } } } - anchors.centerIn: parent; - color: "white"; - font.pixelSize: 16 - font.bold: true } } } diff --git a/examples/declarative/declarative.pro b/examples/declarative/declarative.pro index 0f58738..5fc1cf0 100644 --- a/examples/declarative/declarative.pro +++ b/examples/declarative/declarative.pro @@ -12,7 +12,7 @@ SUBDIRS = \ sources.files = \ animations \ aspectratio \ - behaviours \ + behaviors \ border-image \ clocks \ connections \ diff --git a/examples/symbianpkgrules.pri b/examples/symbianpkgrules.pri index 35edbfb..a1b6634 100644 --- a/examples/symbianpkgrules.pri +++ b/examples/symbianpkgrules.pri @@ -10,6 +10,7 @@ vendorinfo = \ ":\"Nokia, Qt\"" \ " " -default_deployment.pkg_prerules += vendorinfo +examples_deployment.pkg_prerules += vendorinfo +DEPLOYMENT += examples_deployment isEmpty(ICON):ICON = $$QT_SOURCE_TREE/src/s60installs/qt.svg |