summaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qdeclarativepackage.cpp
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-02-25 06:05:19 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-02-25 06:05:19 (GMT)
commitb3613f3f3135afeaa9425b1791567185cbc38435 (patch)
treebdbbd1def8da0b02d766754abd8925971395736e /src/declarative/util/qdeclarativepackage.cpp
parentb915bc2d710e365e7c9083ba65d08de08ea02f74 (diff)
downloadQt-b3613f3f3135afeaa9425b1791567185cbc38435.zip
Qt-b3613f3f3135afeaa9425b1791567185cbc38435.tar.gz
Qt-b3613f3f3135afeaa9425b1791567185cbc38435.tar.bz2
Document Package
Diffstat (limited to 'src/declarative/util/qdeclarativepackage.cpp')
-rw-r--r--src/declarative/util/qdeclarativepackage.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/declarative/util/qdeclarativepackage.cpp b/src/declarative/util/qdeclarativepackage.cpp
index 356d7a1..34ae466 100644
--- a/src/declarative/util/qdeclarativepackage.cpp
+++ b/src/declarative/util/qdeclarativepackage.cpp
@@ -46,6 +46,33 @@
QT_BEGIN_NAMESPACE
+/*!
+ \qmlclass Package QDeclarativePackage
+ \brief Package provides a collection of named items
+
+ The Package class is currently used in conjunction with
+ VisualDataModel to enable delegates with a shared context
+ to be provided to multiple views.
+
+ Any item within a Package may be assigned a name via the
+ \e {Package.name} attached property.
+
+ The example below creates a Package containing two named items;
+ \e list and \e grid. The third element in the package is parented to whichever
+ delegate it should appear in. This allows an item to move
+ between views.
+
+ \snippet examples/declarative/package/Delegate.qml 0
+
+ These named items are used as the delegates by the two views who
+ reference the special VisualDataModel.parts property to select
+ a model which provides the chosen delegate.
+
+ \snippet examples/declarative/package/view.qml 0
+
+*/
+
+
class QDeclarativePackagePrivate : public QObjectPrivate
{
public: