summaryrefslogtreecommitdiffstats
path: root/src/imports/location/declarativeplaces/qdeclarativereviewmodel.cpp
diff options
context:
space:
mode:
authorPeter Yard <peter.yard@nokia.com>2012-04-19 10:45:10 +1000
committerQt by Nokia <qt-info@nokia.com>2012-05-03 02:58:54 +0200
commite14d1fa64a95fbbb6c4f739f96ac87a6de922567 (patch)
tree1aa485ab528ed6a4779c9bc838e85bcb1ef132ca /src/imports/location/declarativeplaces/qdeclarativereviewmodel.cpp
parent9beba94649372be56f7811562d2df03a923e39e2 (diff)
Docs: Bug-6690 fixes. General doc fixes.
Change-Id: I93680ae2da913b67e8a2c22826f43f84ecb4c863 Reviewed-by: abcd <amos.choy@nokia.com> Reviewed-by: Peter Yard <peter.yard@nokia.com>
Diffstat (limited to 'src/imports/location/declarativeplaces/qdeclarativereviewmodel.cpp')
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativereviewmodel.cpp22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/imports/location/declarativeplaces/qdeclarativereviewmodel.cpp b/src/imports/location/declarativeplaces/qdeclarativereviewmodel.cpp
index 3b65c418..12186377 100644
--- a/src/imports/location/declarativeplaces/qdeclarativereviewmodel.cpp
+++ b/src/imports/location/declarativeplaces/qdeclarativereviewmodel.cpp
@@ -57,10 +57,22 @@ QT_BEGIN_NAMESPACE
\brief The ReviewModel element provides access to reviews of a \l Place.
The ReviewModel is a read-only model used to fetch reviews about a \l Place. The model
- incrementally fetches reviews. The number of reviews which are fetched at a time is specified
- by the \l batchSize property. The total number of reviews available can be accessed via the
+ incrementally fetches. The number of reviews which are fetched at a time is specified
+ by the \l batchSize property. The total number of reviews available can be accessed via the
\l totalCount property.
+ To use the ReviewModel we need a view and a delegate. In this snippet we
+ see the setting up of a ListView with a ReviewModel model and a delegate.
+
+ \snippet declarative/places/content/places/PlaceReviews.qml ReviewModel delegate
+
+ The various roles listed below can be selectively displayed, in the \l {Places (QML) Example}
+ the \l {ReviewModel::rating}{rating} is used with the code in \e ReviewPage.qml
+ to provide the format of the displayed data by using the roles from the passed \c data
+ object.
+
+
+
The model returns data for the following roles:
\table
@@ -109,19 +121,19 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \qmlproperty Place ReviewModel::place
+ \qmlproperty Place QtLocation5::ReviewModel::place
This property holds the Place that the reviews are for.
*/
/*!
- \qmlproperty int ReviewModel::batchSize
+ \qmlproperty int QtLocation5::ReviewModel::batchSize
This property holds the batch size to use when fetching more reviews.
*/
/*!
- \qmlproperty int ReviewModel::totalCount
+ \qmlproperty int QtLocation5::ReviewModel::totalCount
This property holds the total number of reviews for the place.
*/