src/declarative/util/qdeclarativepackage.cpp
changeset 33 3e2da88830cd
parent 30 5dc02b23752f
child 37 758a864f9613
equal deleted inserted replaced
30:5dc02b23752f 33:3e2da88830cd
    46 
    46 
    47 QT_BEGIN_NAMESPACE
    47 QT_BEGIN_NAMESPACE
    48 
    48 
    49 /*!
    49 /*!
    50     \qmlclass Package QDeclarativePackage
    50     \qmlclass Package QDeclarativePackage
    51     \brief Package provides a collection of named items
    51     \brief Package provides a collection of named items.
    52 
    52 
    53     The Package class is currently used in conjunction with
    53     The Package class is used in conjunction with
    54     VisualDataModel to enable delegates with a shared context
    54     VisualDataModel to enable delegates with a shared context
    55     to be provided to multiple views.
    55     to be provided to multiple views.
    56 
    56 
    57     Any item within a Package may be assigned a name via the
    57     Any item within a Package may be assigned a name via the
    58     \e {Package.name} attached property.
    58     \l{Package::name}{Package.name} attached property.
    59 
    59 
    60     The example below creates a Package containing two named items;
    60     The example below creates a Package containing two named items;
    61     \e list and \e grid.  The third element in the package is parented to whichever
    61     \e list and \e grid.  The third element in the package (the \l Rectangle) is parented to whichever
    62     delegate it should appear in.  This allows an item to move
    62     delegate it should appear in.  This allows an item to move
    63     between views.
    63     between views.
    64 
    64 
    65     \snippet examples/declarative/modelviews/package/Delegate.qml 0
    65     \snippet examples/declarative/modelviews/package/Delegate.qml 0
    66 
    66 
    67     These named items are used as the delegates by the two views who
    67     These named items are used as the delegates by the two views who
    68     reference the special VisualDataModel.parts property to select
    68     reference the special \l{VisualDataModel::parts} property to select
    69     a model which provides the chosen delegate.
    69     a model which provides the chosen delegate.
    70 
    70 
    71     \snippet examples/declarative/modelviews/package/view.qml 0
    71     \snippet examples/declarative/modelviews/package/view.qml 0
    72 
    72 
    73     \sa QtDeclarative
    73     \sa {declarative/modelviews/package}{Package example}, {demos/declarative/photoviewer}{Photo Viewer demo}, QtDeclarative
       
    74 */
       
    75 
       
    76 /*!
       
    77     \qmlattachedproperty string Package::name
       
    78     This attached property holds the name of an item within a Package.
    74 */
    79 */
    75 
    80 
    76 
    81 
    77 class QDeclarativePackagePrivate : public QObjectPrivate
    82 class QDeclarativePackagePrivate : public QObjectPrivate
    78 {
    83 {