summaryrefslogtreecommitdiffstats
path: root/examples/declarative
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-10-28 06:31:10 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-10-28 06:31:10 (GMT)
commit6aacf78c1e22597553a2b237fb595a37e4fb8d00 (patch)
tree68acb11e801554b722ba31963a248d94cc7ea0c4 /examples/declarative
parent1e9661995a5c12d41da31d001c6ded30d0ae1b29 (diff)
downloadQt-6aacf78c1e22597553a2b237fb595a37e4fb8d00.zip
Qt-6aacf78c1e22597553a2b237fb595a37e4fb8d00.tar.gz
Qt-6aacf78c1e22597553a2b237fb595a37e4fb8d00.tar.bz2
Incorporate latest optical theory.
Diffstat (limited to 'examples/declarative')
-rw-r--r--examples/declarative/dynamic/PerspectiveItem.qml12
-rw-r--r--examples/declarative/dynamic/dynamic.qml6
2 files changed, 15 insertions, 3 deletions
diff --git a/examples/declarative/dynamic/PerspectiveItem.qml b/examples/declarative/dynamic/PerspectiveItem.qml
new file mode 100644
index 0000000..9e09dd2
--- /dev/null
+++ b/examples/declarative/dynamic/PerspectiveItem.qml
@@ -0,0 +1,12 @@
+import Qt 4.6
+
+Image {
+ id: tree
+ property bool created: false
+ opacity: y+height > window.height/2 ? 1 : 0.25
+ onCreatedChanged: if (created && y+height<=window.height/2) { tree.destroy() }
+ scale: y+height > window.height/2 ? (y+height-250)*0.01 : 1
+ transformOrigin: "Center"
+ source: image;
+ z: y
+}
diff --git a/examples/declarative/dynamic/dynamic.qml b/examples/declarative/dynamic/dynamic.qml
index 885e037..ea4e0cd 100644
--- a/examples/declarative/dynamic/dynamic.qml
+++ b/examples/declarative/dynamic/dynamic.qml
@@ -79,17 +79,17 @@ Item {
}
PaletteItem{
anchors.verticalCenter: parent.verticalCenter
- file: "GenericItem.qml"
+ file: "PerspectiveItem.qml"
image: "images/tree_s.png"
}
PaletteItem{
anchors.verticalCenter: parent.verticalCenter
- file: "GenericItem.qml"
+ file: "PerspectiveItem.qml"
image: "images/rabbit_brown.png"
}
PaletteItem{
anchors.verticalCenter: parent.verticalCenter
- file: "GenericItem.qml"
+ file: "PerspectiveItem.qml"
image: "images/rabbit_bw.png"
}
}