diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-07-19 03:26:10 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-07-19 03:26:10 (GMT) |
commit | 931222b7d665e101ada070afb51b82f9bb85db6d (patch) | |
tree | d361d1f2d1760ee0434729e2419a45e80af03a40 | |
parent | 19473443dbeff4a57cd6ec6572ca29c2e70d672c (diff) | |
download | Qt-931222b7d665e101ada070afb51b82f9bb85db6d.zip Qt-931222b7d665e101ada070afb51b82f9bb85db6d.tar.gz Qt-931222b7d665e101ada070afb51b82f9bb85db6d.tar.bz2 |
PathView doc clarification.
5 files changed, 27 insertions, 12 deletions
diff --git a/doc/src/examples/qml-examples.qdoc b/doc/src/examples/qml-examples.qdoc index ce53677..3fd4ea8 100644 --- a/doc/src/examples/qml-examples.qdoc +++ b/doc/src/examples/qml-examples.qdoc @@ -317,6 +317,15 @@ */ /*! + \title Models and Views: PathView + \example declarative/modelviews/pathview + + This example shows how to use the PathView element. + + \image qml-pathview-example.png +*/ + +/*! \title Models and Views: Object ListModel \example declarative/modelviews/objectlistmodel diff --git a/doc/src/snippets/declarative/pathview/pathattributes.qml b/doc/src/snippets/declarative/pathview/pathattributes.qml index 8d424a8..4daee63 100644 --- a/doc/src/snippets/declarative/pathview/pathattributes.qml +++ b/doc/src/snippets/declarative/pathview/pathattributes.qml @@ -49,8 +49,8 @@ Rectangle { id: delegate Item { width: 80; height: 80 - scale: PathView.scale - opacity: PathView.opacity + scale: PathView.iconScale + opacity: PathView.iconOpacity Column { Image { anchors.horizontalCenter: name.horizontalCenter; width: 64; height: 64; source: icon } Text { text: name; font.pointSize: 16} @@ -66,11 +66,11 @@ Rectangle { delegate: delegate path: Path { startX: 120; startY: 100 - PathAttribute { name: "scale"; value: 1.0 } - PathAttribute { name: "opacity"; value: 1.0 } + PathAttribute { name: "iconScale"; value: 1.0 } + PathAttribute { name: "iconOpacity"; value: 1.0 } PathQuad { x: 120; y: 25; controlX: 260; controlY: 75 } - PathAttribute { name: "scale"; value: 0.3 } - PathAttribute { name: "opacity"; value: 0.5 } + PathAttribute { name: "iconScale"; value: 0.3 } + PathAttribute { name: "iconOpacity"; value: 0.5 } PathQuad { x: 120; y: 100; controlX: -20; controlY: 75 } } } diff --git a/examples/declarative/modelviews/pathview/pathview-example.qml b/examples/declarative/modelviews/pathview/pathview-example.qml index 59a0acb..0a3b34c 100644 --- a/examples/declarative/modelviews/pathview/pathview-example.qml +++ b/examples/declarative/modelviews/pathview/pathview-example.qml @@ -57,10 +57,9 @@ Rectangle { Component { id: appDelegate - Item { width: 100; height: 100 - scale: PathView.scale + scale: PathView.iconScale Image { id: myIcon @@ -98,11 +97,11 @@ Rectangle { path: Path { startX: 10 startY: 50 - PathAttribute { name: "scale"; value: 0.5 } + PathAttribute { name: "iconScale"; value: 0.5 } PathQuad { x: 200; y: 150; controlX: 50; controlY: 200 } - PathAttribute { name: "scale"; value: 1.0 } + PathAttribute { name: "iconScale"; value: 1.0 } PathQuad { x: 390; y: 50; controlX: 350; controlY: 200 } - PathAttribute { name: "scale"; value: 0.5 } + PathAttribute { name: "iconScale"; value: 0.5 } } } } diff --git a/src/declarative/graphicsitems/qdeclarativepath.cpp b/src/declarative/graphicsitems/qdeclarativepath.cpp index a904869..80196a1 100644 --- a/src/declarative/graphicsitems/qdeclarativepath.cpp +++ b/src/declarative/graphicsitems/qdeclarativepath.cpp @@ -533,6 +533,13 @@ void QDeclarativeCurve::setY(qreal y) /*! \qmlproperty string PathAttribute::name the name of the attribute to change. + + This attribute will be available to the delegate as PathView.<name> + + Note that using an existing Item property name such as "opacity" as an + attribute is allowed. This is because path attributes add a new + \l{qdeclarativeintroduction.html#attached-properties} {Attached Property} + which in no way clashes with existing properties. */ /*! diff --git a/src/declarative/util/qdeclarativetransition.cpp b/src/declarative/util/qdeclarativetransition.cpp index 34e1e2b..6b7418e 100644 --- a/src/declarative/util/qdeclarativetransition.cpp +++ b/src/declarative/util/qdeclarativetransition.cpp @@ -78,7 +78,7 @@ QT_BEGIN_NAMESPACE Transition { ... } ] } - |endqml + \endqml \sa {declarative/animation/states}{states example}, {qmlstates}{States}, {state-transitions}{Transitions}, {QtDeclarative} */ |