summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2009-10-22 05:39:21 (GMT)
committerMartin Jones <martin.jones@nokia.com>2009-10-22 05:39:21 (GMT)
commit9e9c979affd1ce76a07c6545c25d2851c7964a7c (patch)
treebb75b64ad51eba42f5c9b60af5d551dba8a3777a
parent6425ab5e2392584a0bf6455d426163bf6f257e82 (diff)
downloadQt-9e9c979affd1ce76a07c6545c25d2851c7964a7c.zip
Qt-9e9c979affd1ce76a07c6545c25d2851c7964a7c.tar.gz
Qt-9e9c979affd1ce76a07c6545c25d2851c7964a7c.tar.bz2
Attached property docs for GridView
-rw-r--r--src/declarative/fx/qfxgridview.cpp55
1 files changed, 53 insertions, 2 deletions
diff --git a/src/declarative/fx/qfxgridview.cpp b/src/declarative/fx/qfxgridview.cpp
index 6abe88e..68fae6a 100644
--- a/src/declarative/fx/qfxgridview.cpp
+++ b/src/declarative/fx/qfxgridview.cpp
@@ -679,8 +679,6 @@ void QFxGridViewPrivate::updateCurrent(int modelIndex)
In this case ListModel is a handy way for us to test our UI. In practice
the model would be implemented in C++, or perhaps via a SQL data source.
-
-
*/
QFxGridView::QFxGridView(QFxItem *parent)
: QFxFlickable(*(new QFxGridViewPrivate), parent)
@@ -698,6 +696,59 @@ QFxGridView::~QFxGridView()
}
/*!
+ \qmlattachedproperty bool GridView::isCurrentItem
+ This attched property is true if this delegate is the current item; otherwise false.
+
+ It is attached to each instance of the delegate.
+*/
+
+/*!
+ \qmlattachedproperty GridView GridView::view
+ This attached property holds the view that manages this delegate instance.
+
+ It is attached to each instance of the delegate.
+*/
+
+/*!
+ \qmlattachedproperty bool GridView::delayRemove
+ This attached property holds whether the delegate may be destroyed.
+
+ It is attached to each instance of the delegate.
+
+ It is sometimes necessary to delay the destruction of an item
+ until an animation completes.
+
+ The example below ensures that the animation completes before
+ the item is removed from the grid.
+
+ \code
+ Component {
+ id: myDelegate
+ Item {
+ id: wrapper
+ GridView.onRemove: SequentialAnimation {
+ PropertyAction { target: wrapper.GridView; property: "delayRemove"; value: true }
+ NumberAnimation { target: wrapper; property: "scale"; to: 0; duration: 250; easing: "easeInOutQuad" }
+ PropertyAction { target: wrapper.GridView; property: "delayRemove"; value: false }
+ }
+ }
+ }
+ \endcode
+*/
+
+//XXX change to \qmlattachedsignal when it exists.
+/*!
+ \qmlattachedproperty void GridView::onAdd
+ This attached handler is called immediately after an item is added to the view.
+*/
+
+/*!
+ \qmlattachedproperty void GridView::onRemove
+ This attached handler is called immediately before an item is removed from the view.
+*/
+
+
+/*!
\qmlproperty model GridView::model
This property holds the model providing data for the grid.