diff options
Diffstat (limited to 'doc/src/snippets/declarative/pathview')
-rw-r--r-- | doc/src/snippets/declarative/pathview/ContactModel.qml (renamed from doc/src/snippets/declarative/pathview/dummydata/MenuModel.qml) | 9 | ||||
-rw-r--r-- | doc/src/snippets/declarative/pathview/pathattributes.qml | 13 | ||||
-rw-r--r-- | doc/src/snippets/declarative/pathview/pathview.qml | 22 | ||||
-rw-r--r-- | doc/src/snippets/declarative/pathview/pics/qtlogo.png (renamed from doc/src/snippets/declarative/pathview/pics/qtlogo-64.png) | bin | 2991 -> 2991 bytes |
4 files changed, 24 insertions, 20 deletions
diff --git a/doc/src/snippets/declarative/pathview/dummydata/MenuModel.qml b/doc/src/snippets/declarative/pathview/ContactModel.qml index a52b60a..1a042a3 100644 --- a/doc/src/snippets/declarative/pathview/dummydata/MenuModel.qml +++ b/doc/src/snippets/declarative/pathview/ContactModel.qml @@ -39,20 +39,21 @@ ** ****************************************************************************/ +//![0] import Qt 4.7 ListModel { - id: menuModel ListElement { name: "Bill Jones" - icon: "pics/qtlogo-64.png" + icon: "pics/qtlogo.png" } ListElement { name: "Jane Doe" - icon: "pics/qtlogo-64.png" + icon: "pics/qtlogo.png" } ListElement { name: "John Smith" - icon: "pics/qtlogo-64.png" + icon: "pics/qtlogo.png" } } +//![0] diff --git a/doc/src/snippets/declarative/pathview/pathattributes.qml b/doc/src/snippets/declarative/pathview/pathattributes.qml index e8d2509..3ba3b95 100644 --- a/doc/src/snippets/declarative/pathview/pathattributes.qml +++ b/doc/src/snippets/declarative/pathview/pathattributes.qml @@ -39,16 +39,16 @@ ** ****************************************************************************/ +//! [0] import Qt 4.7 Rectangle { - width: 240; height: 200; color: 'white' -//! [0] + width: 240; height: 200 + //! [1] Component { id: delegate Item { - id: wrapper width: 80; height: 80 scale: PathView.scale opacity: PathView.opacity @@ -59,9 +59,12 @@ Rectangle { } } //! [1] + //! [2] PathView { - anchors.fill: parent; model: MenuModel; delegate: delegate + anchors.fill: parent + model: ContactModel {} + delegate: delegate path: Path { startX: 120; startY: 100 PathAttribute { name: "scale"; value: 1.0 } @@ -73,5 +76,5 @@ Rectangle { } } //! [2] -//! [0] } +//! [0] diff --git a/doc/src/snippets/declarative/pathview/pathview.qml b/doc/src/snippets/declarative/pathview/pathview.qml index 31b793d..1669847 100644 --- a/doc/src/snippets/declarative/pathview/pathview.qml +++ b/doc/src/snippets/declarative/pathview/pathview.qml @@ -39,27 +39,27 @@ ** ****************************************************************************/ +//! [0] import Qt 4.7 Rectangle { - width: 240; height: 200; color: 'white' -//! [0] + width: 240; height: 200 + //! [1] Component { id: delegate - Item { - id: wrapper - width: 80; height: 80 - Column { - Image { anchors.horizontalCenter: name.horizontalCenter; width: 64; height: 64; source: icon } - Text { text: name; font.pointSize: 16} - } + Column { + Image { anchors.horizontalCenter: name.horizontalCenter; width: 64; height: 64; source: icon } + Text { text: name; font.pointSize: 16 } } } //! [1] + //! [2] PathView { - anchors.fill: parent; model: MenuModel; delegate: delegate + anchors.fill: parent + model: ContactModel {} + delegate: delegate path: Path { startX: 120; startY: 100 PathQuad { x: 120; y: 25; controlX: 260; controlY: 75 } @@ -67,5 +67,5 @@ Rectangle { } } //! [2] -//! [0] } +//! [0] diff --git a/doc/src/snippets/declarative/pathview/pics/qtlogo-64.png b/doc/src/snippets/declarative/pathview/pics/qtlogo.png Binary files differindex 4f68e16..4f68e16 100644 --- a/doc/src/snippets/declarative/pathview/pics/qtlogo-64.png +++ b/doc/src/snippets/declarative/pathview/pics/qtlogo.png |