summaryrefslogtreecommitdiffstats
path: root/examples/declarative/dynamic
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2009-10-28 08:26:20 (GMT)
committerAlan Alpert <alan.alpert@nokia.com>2009-10-28 08:26:20 (GMT)
commit07e1b6615e868af6434bb8e42dc2d44a51075204 (patch)
tree5bc94729576e561eae6bb9470dda0ab61b439f18 /examples/declarative/dynamic
parent1d14bbef27945d7823e9c32745e51d187093f1b7 (diff)
parent30d8810bfab9c8157f80e5e38beda1ad8c0acfb0 (diff)
downloadQt-07e1b6615e868af6434bb8e42dc2d44a51075204.zip
Qt-07e1b6615e868af6434bb8e42dc2d44a51075204.tar.gz
Qt-07e1b6615e868af6434bb8e42dc2d44a51075204.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Conflicts: doc/src/declarative/globalobject.qdoc
Diffstat (limited to 'examples/declarative/dynamic')
-rw-r--r--examples/declarative/dynamic/PerspectiveItem.qml12
-rw-r--r--examples/declarative/dynamic/dynamic.qml8
2 files changed, 15 insertions, 5 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 e083a5b..ea4e0cd 100644
--- a/examples/declarative/dynamic/dynamic.qml
+++ b/examples/declarative/dynamic/dynamic.qml
@@ -68,30 +68,28 @@ Item {
Text{ text: "Drag an item into the scene." }
Row{ id: toolRow
spacing: 8;
- height: childrenRect.height//TODO: Put bug in JIRA when it comes back up
PaletteItem{
anchors.verticalCenter: parent.verticalCenter
file: "Sun.qml";
image: "images/sun.png"
}
PaletteItem{
- anchors.verticalCenter: parent.verticalCenter
file: "GenericItem.qml"
image: "images/moon.png"
}
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"
}
}