summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/declarative/pathview/pathattributes.qml
diff options
context:
space:
mode:
authorBenjamin Poulain <benjamin.poulain@nokia.com>2010-02-23 17:45:41 (GMT)
committerBenjamin Poulain <benjamin.poulain@nokia.com>2010-02-23 17:45:41 (GMT)
commit615972e09981a0916422716b4f6572c6401789da (patch)
tree82203c15bceebd5426c823852ef5c85ad025e92b /doc/src/snippets/declarative/pathview/pathattributes.qml
parent60fd302e8d88b92ade59d68872c99310128c3a6c (diff)
parentde4332a4728e739b37e9c7b04c021e150e096270 (diff)
downloadQt-615972e09981a0916422716b4f6572c6401789da.zip
Qt-615972e09981a0916422716b4f6572c6401789da.tar.gz
Qt-615972e09981a0916422716b4f6572c6401789da.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1
Diffstat (limited to 'doc/src/snippets/declarative/pathview/pathattributes.qml')
-rw-r--r--doc/src/snippets/declarative/pathview/pathattributes.qml36
1 files changed, 36 insertions, 0 deletions
diff --git a/doc/src/snippets/declarative/pathview/pathattributes.qml b/doc/src/snippets/declarative/pathview/pathattributes.qml
new file mode 100644
index 0000000..19a192c
--- /dev/null
+++ b/doc/src/snippets/declarative/pathview/pathattributes.qml
@@ -0,0 +1,36 @@
+import Qt 4.6
+
+Rectangle {
+ width: 240; height: 200; color: 'white'
+//! [0]
+//! [1]
+ Component {
+ id: delegate
+ Item {
+ id: wrapper
+ width: 80; height: 80
+ scale: PathView.scale
+ opacity: PathView.opacity
+ Column {
+ Image { anchors.horizontalCenter: name.horizontalCenter; width: 64; height: 64; source: icon }
+ Text { id: name; text: name; font.pointSize: 16}
+ }
+ }
+ }
+//! [1]
+//! [2]
+ PathView {
+ anchors.fill: parent; model: MenuModel; delegate: delegate
+ path: Path {
+ startX: 120; startY: 100
+ PathAttribute { name: "scale"; value: 1.0 }
+ PathAttribute { name: "opacity"; value: 1.0 }
+ PathQuad { x: 120; y: 25; controlX: 260; controlY: 75 }
+ PathAttribute { name: "scale"; value: 0.3 }
+ PathAttribute { name: "opacity"; value: 0.5 }
+ PathQuad { x: 120; y: 100; controlX: -20; controlY: 75 }
+ }
+ }
+//! [2]
+//! [0]
+}