diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-05-01 00:56:31 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-05-01 00:56:31 (GMT) |
commit | 7af48b011d1f84e4790fc4b9bdcd65e860c011a7 (patch) | |
tree | b924119f9d5bc227ec896c8a0fd5fd68ae5b80bb /doc/src/snippets | |
parent | 788d5384e07f91b0f88efb2101b427e6edb79399 (diff) | |
parent | 09be36905f81923e665743520b93a24af0ec784d (diff) | |
download | Qt-7af48b011d1f84e4790fc4b9bdcd65e860c011a7.zip Qt-7af48b011d1f84e4790fc4b9bdcd65e860c011a7.tar.gz Qt-7af48b011d1f84e4790fc4b9bdcd65e860c011a7.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'doc/src/snippets')
-rw-r--r-- | doc/src/snippets/declarative/pathview/dummydata/MenuModel.qml | 15 | ||||
-rw-r--r-- | doc/src/snippets/declarative/pathview/pathattributes.qml | 34 | ||||
-rw-r--r-- | doc/src/snippets/declarative/pathview/pathview.qml | 28 | ||||
-rw-r--r-- | doc/src/snippets/declarative/pathview/pics/qtlogo-64.png | bin | 0 -> 2991 bytes | |||
-rw-r--r-- | doc/src/snippets/declarative/pics/qt.png | bin | 0 -> 514 bytes | |||
-rw-r--r-- | doc/src/snippets/declarative/rotation.qml | 27 |
6 files changed, 104 insertions, 0 deletions
diff --git a/doc/src/snippets/declarative/pathview/dummydata/MenuModel.qml b/doc/src/snippets/declarative/pathview/dummydata/MenuModel.qml new file mode 100644 index 0000000..5b973d7 --- /dev/null +++ b/doc/src/snippets/declarative/pathview/dummydata/MenuModel.qml @@ -0,0 +1,15 @@ +ListModel2 { + id: MenuModel + ListElement { + name: "Bill Jones" + icon: "pics/qtlogo-64.png" + } + ListElement { + name: "Jane Doe" + icon: "pics/qtlogo-64.png" + } + ListElement { + name: "John Smith" + icon: "pics/qtlogo-64.png" + } +} diff --git a/doc/src/snippets/declarative/pathview/pathattributes.qml b/doc/src/snippets/declarative/pathview/pathattributes.qml new file mode 100644 index 0000000..44789f2 --- /dev/null +++ b/doc/src/snippets/declarative/pathview/pathattributes.qml @@ -0,0 +1,34 @@ +Rect { + width: 240; height: 200; color: 'white' +//! [0] +//! [1] + Component { + id: Delegate + Item { + id: Wrapper + width: 80; height: 80 + scale: PathView.scale + opacity: PathView.opacity + VerticalLayout { + Image { anchors.horizontalCenter: Name.horizontalCenter; width: 64; height: 64; source: icon } + Text { id: Name; text: name; font.size: 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] +} diff --git a/doc/src/snippets/declarative/pathview/pathview.qml b/doc/src/snippets/declarative/pathview/pathview.qml new file mode 100644 index 0000000..11df0a2 --- /dev/null +++ b/doc/src/snippets/declarative/pathview/pathview.qml @@ -0,0 +1,28 @@ +Rect { + width: 240; height: 200; color: 'white' +//! [0] +//! [1] + Component { + id: Delegate + Item { + id: Wrapper + width: 80; height: 80 + VerticalLayout { + Image { anchors.horizontalCenter: Name.horizontalCenter; width: 64; height: 64; source: icon } + Text { id: Name; text: name; font.size: 16} + } + } + } +//! [1] +//! [2] + PathView { + anchors.fill: parent; model: MenuModel; delegate: Delegate + path: Path { + startX: 120; startY: 100 + PathQuad { x: 120; y: 25; controlX: 260; controlY: 75 } + PathQuad { x: 120; y: 100; controlX: -20; controlY: 75 } + } + } +//! [2] +//! [0] +} diff --git a/doc/src/snippets/declarative/pathview/pics/qtlogo-64.png b/doc/src/snippets/declarative/pathview/pics/qtlogo-64.png Binary files differnew file mode 100644 index 0000000..4f68e16 --- /dev/null +++ b/doc/src/snippets/declarative/pathview/pics/qtlogo-64.png diff --git a/doc/src/snippets/declarative/pics/qt.png b/doc/src/snippets/declarative/pics/qt.png Binary files differnew file mode 100644 index 0000000..cbed1a9 --- /dev/null +++ b/doc/src/snippets/declarative/pics/qt.png diff --git a/doc/src/snippets/declarative/rotation.qml b/doc/src/snippets/declarative/rotation.qml new file mode 100644 index 0000000..01838dd --- /dev/null +++ b/doc/src/snippets/declarative/rotation.qml @@ -0,0 +1,27 @@ +Rect { + width: 360; height: 80 + color: "white" +//! [0] + HorizontalLayout { + margin: 10 + spacing: 10 + Image { source: "pics/qt.png" } + Image { + source: "pics/qt.png" + transform: Rotation3D { axis.startX: 30; axis.endX: 30; axis.endY: 60; angle: 18 } + } + Image { + source: "pics/qt.png" + transform: Rotation3D { axis.startX: 30; axis.endX: 30; axis.endY: 60; angle: 36 } + } + Image { + source: "pics/qt.png" + transform: Rotation3D { axis.startX: 30; axis.endX: 30; axis.endY: 60; angle: 54 } + } + Image { + source: "pics/qt.png" + transform: Rotation3D { axis.startX: 30; axis.endX: 30; axis.endY: 60; angle: 72 } + } + } +//! [0] +} |