diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-06-10 01:19:48 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-06-10 01:23:51 (GMT) |
commit | 2306073c6806e3e35d0786fec5c49e165b119e36 (patch) | |
tree | 7dac894964284deb8ceb570f4935b2e0d6b73726 /src/declarative | |
parent | d346ba1ec7a1becd5120fbe181da0374606481c6 (diff) | |
download | Qt-2306073c6806e3e35d0786fec5c49e165b119e36.zip Qt-2306073c6806e3e35d0786fec5c49e165b119e36.tar.gz Qt-2306073c6806e3e35d0786fec5c49e165b119e36.tar.bz2 |
Document attached properties
Diffstat (limited to 'src/declarative')
4 files changed, 22 insertions, 3 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index 0609a48..ed1d271 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -1087,7 +1087,7 @@ QDeclarativeGridView::~QDeclarativeGridView() /*! \qmlattachedproperty bool GridView::isCurrentItem - This attched property is true if this delegate is the current item; otherwise false. + This attached property is true if this delegate is the current item; otherwise false. It is attached to each instance of the delegate. */ diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp index f58b054..0c2d249 100644 --- a/src/declarative/graphicsitems/qdeclarativepathview.cpp +++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp @@ -358,6 +358,13 @@ QDeclarativePathView::~QDeclarativePathView() } /*! + \qmlattachedproperty PathView PathView::view + This attached property holds the view that manages this delegate instance. + + It is attached to each instance of the delegate. +*/ + +/*! \qmlattachedproperty bool PathView::onPath This attached property holds whether the item is currently on the path. diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp index e133adb..410f526 100644 --- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp +++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp @@ -119,7 +119,7 @@ public: delegate (items). An item can determine its index within the - model via the \c VisualItemModel.index attached property. + model via the \l{VisualItemModel::index}{index} attached property. The example below places three colored rectangles in a ListView. \code @@ -147,6 +147,13 @@ QDeclarativeVisualItemModel::QDeclarativeVisualItemModel(QObject *parent) { } +/*! + \qmlattachedproperty int VisualItemModel::index + This attached property holds the index of this delegate's item within the model. + + It is attached to each instance of the delegate. +*/ + QDeclarativeListProperty<QDeclarativeItem> QDeclarativeVisualItemModel::children() { Q_D(QDeclarativeVisualItemModel); diff --git a/src/declarative/util/qdeclarativepackage.cpp b/src/declarative/util/qdeclarativepackage.cpp index 9245fc2..b149120 100644 --- a/src/declarative/util/qdeclarativepackage.cpp +++ b/src/declarative/util/qdeclarativepackage.cpp @@ -55,7 +55,7 @@ QT_BEGIN_NAMESPACE to be provided to multiple views. Any item within a Package may be assigned a name via the - \e {Package.name} attached property. + \l{Package::name}{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 (the \l Rectangle) is parented to whichever @@ -73,6 +73,11 @@ QT_BEGIN_NAMESPACE \sa {declarative/modelviews/package}{Package example}, QtDeclarative */ +/*! + \qmlattachedproperty bool Package::name + This attached property holds the name of an item within a Package. +*/ + class QDeclarativePackagePrivate : public QObjectPrivate { |