summaryrefslogtreecommitdiffstats
path: root/examples/declarative/parallax
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-05-11 05:07:46 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-05-11 05:07:46 (GMT)
commitb4c589868f278aa9a58ab9afa727dbf0a9442e22 (patch)
tree98381c0770242ab1b177a875042df7dcb0bed886 /examples/declarative/parallax
parent03f8f1df0d88f5ffe0b3120cffce614cbeefdb70 (diff)
parent367798c3cfaac56d82b29a90061d621e2b5854a5 (diff)
downloadQt-b4c589868f278aa9a58ab9afa727dbf0a9442e22.zip
Qt-b4c589868f278aa9a58ab9afa727dbf0a9442e22.tar.gz
Qt-b4c589868f278aa9a58ab9afa727dbf0a9442e22.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: (144 commits) Correct Flipable back item based on parent, not scene transform Round ideal width up to prevent incorrect word wrapping on Mac OS X Correct ownership of signal handlers in state changes. Remove unnecesary check for debug output. Error message on QWS appears to have changed. Removed multimedia effects from tvtennis declarative example Add some test asserts Fixes doc of mouse area's onEntered Remove debug messages from mousearea autotest file Prevent handling of Up/Down on Mac OS X, for consistency with other platforms. Optimize QGW constructor. There is no Qt.widgets Avoid changing header dependencies. Avoid many unnecessary allocations, so so that paint engines attached to pixmaps Doc Fix autotests Fix autotests (remove import Qt.widgets) Add missing qml file to qdeclarativemousearea Doc fix Clean up example code, add white background behind text ...
Diffstat (limited to 'examples/declarative/parallax')
-rw-r--r--examples/declarative/parallax/parallax.qml2
-rw-r--r--examples/declarative/parallax/qml/ParallaxView.qml15
-rw-r--r--examples/declarative/parallax/qml/Smiley.qml7
3 files changed, 11 insertions, 13 deletions
diff --git a/examples/declarative/parallax/parallax.qml b/examples/declarative/parallax/parallax.qml
index cb0437d..ca00176 100644
--- a/examples/declarative/parallax/parallax.qml
+++ b/examples/declarative/parallax/parallax.qml
@@ -31,7 +31,7 @@ Rectangle {
Loader {
anchors { top: parent.top; topMargin: 10; horizontalCenter: parent.horizontalCenter }
width: 300; height: 400
- clip: true; resizeMode: Loader.SizeItemToLoader
+ clip: true;
source: "../../../demos/declarative/samegame/samegame.qml"
}
}
diff --git a/examples/declarative/parallax/qml/ParallaxView.qml b/examples/declarative/parallax/qml/ParallaxView.qml
index 4b38d45..e869a21 100644
--- a/examples/declarative/parallax/qml/ParallaxView.qml
+++ b/examples/declarative/parallax/qml/ParallaxView.qml
@@ -18,9 +18,9 @@ Item {
id: list
currentIndex: root.currentIndex
- onCurrentIndexChanged: root.currentIndex = currentIndex
+ onCurrentIndexChanged: root.currentIndex = currentIndex
- orientation: "Horizontal"
+ orientation: Qt.Horizontal
boundsBehavior: Flickable.DragOverBounds
anchors.fill: parent
model: VisualItemModel { id: visualModel }
@@ -45,10 +45,10 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter
width: Math.min(count * 50, parent.width - 20)
interactive: width == parent.width - 20
- orientation: "Horizontal"
+ orientation: Qt.Horizontal
- delegate: Item {
- width: 50; height: 50
+ delegate: Item {
+ width: 50; height: 50
id: delegateRoot
Image {
@@ -56,7 +56,6 @@ Item {
source: modelData.icon
smooth: true
scale: 0.8
- transformOrigin: "Center"
}
MouseArea {
@@ -64,10 +63,10 @@ Item {
onClicked: { root.currentIndex = index }
}
- states: State {
+ states: State {
name: "Selected"
when: delegateRoot.ListView.isCurrentItem == true
- PropertyChanges {
+ PropertyChanges {
target: image
scale: 1
y: -5
diff --git a/examples/declarative/parallax/qml/Smiley.qml b/examples/declarative/parallax/qml/Smiley.qml
index b1e1ae8..662addc 100644
--- a/examples/declarative/parallax/qml/Smiley.qml
+++ b/examples/declarative/parallax/qml/Smiley.qml
@@ -8,7 +8,6 @@ Item {
Image {
anchors.horizontalCenter: parent.horizontalCenter
source: "../pics/shadow.png"; y: smiley.minHeight + 58
- transformOrigin: Item.Center
// The scale property depends on the y position of the smiley face.
scale: smiley.y * 0.5 / (smiley.minHeight - smiley.maxHeight)
@@ -30,13 +29,13 @@ Item {
// Move from minHeight to maxHeight in 300ms, using the OutExpo easing function
NumberAnimation {
from: smiley.minHeight; to: smiley.maxHeight
- easing.type: "OutExpo"; duration: 300
+ easing.type: Easing.OutExpo; duration: 300
}
-
+
// Then move back to minHeight in 1 second, using the OutBounce easing function
NumberAnimation {
from: smiley.maxHeight; to: smiley.minHeight
- easing.type: "OutBounce"; duration: 1000
+ easing.type: Easing.OutBounce; duration: 1000
}
// Then pause for 500ms