diff options
author | Jean Gressmann <jean.gressmann@nokia.com> | 2012-03-01 15:35:10 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-02 09:45:01 +0100 |
commit | e1a67491cc3129fa12509a4441c3f9b49b6623d5 (patch) | |
tree | 354dbf5acf021834b2009937a117641f0f7d2d6b /doc/src | |
parent | ca2ed3ecca8d7797433083781c6f5365ef47cdc5 (diff) | |
download | qtlocation-e1a67491cc3129fa12509a4441c3f9b49b6623d5.tar.gz |
Places QML API documentation is incomplete
Attempt at fixing QTBUG-24438
The QML documentation changes are:
* ContactDetail, EditorialModel, ImageModel, Supplier, User now have an example
* errorString method documented for CategoryModel, PlaceRecommendationModel, PlaceSearchSuggestionModel
* Added documentation for PlaceSearchModel::SearchResultType.
* Documented ExtendedAttributes::onValueChanged signal.
Change-Id: I37dbee7107713996592a98abade26d32f7cc9b0e
Reviewed-by: Alex <alex.blasche@nokia.com>
Reviewed-by: abcd <amos.choy@nokia.com>
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/snippets/declarative/places.qml | 107 |
1 files changed, 106 insertions, 1 deletions
diff --git a/doc/src/snippets/declarative/places.qml b/doc/src/snippets/declarative/places.qml index ed16db0c..815de856 100644 --- a/doc/src/snippets/declarative/places.qml +++ b/doc/src/snippets/declarative/places.qml @@ -180,6 +180,112 @@ Item { } //! [SearchSuggestionModel] + //! [EditorialModel] + EditorialModel { + id: editorialModel + batchSize: 3 + place: place + } + + ListView { + model: editorialModel + delegate: Item { + anchors.fill: parent + + Column { + width: parent.width + clip: true + + Text { + text: title + width: parent.width + wrapMode: Text.WordWrap + font.pixelSize: 24 + } + + Text { + text: text + width: parent.width + wrapMode: Text.WordWrap + font.pixelSize: 20 + } + + Row { + Image { + width: 16 + height: 16 + + source: supplier.icon.url(Qt.size(width, height), Icon.List) + } + + Text { + text: "Provided by " + supplier.name + font.pixelSize: 16 + } + } + + Text { + text: "Contributed by " + user.name + font.pixelSize: 16 + } + + Text { + text: attribution + font.pixelSize: 8 + } + } + } + } + //! [EditorialModel] + + //! [ImageModel] + ImageModel { + id: imageModel + batchSize: 3 + place: place + } + + ListView { + anchors.top: parent.top + anchors.bottom: position.top + width: parent.width + spacing: 10 + + model: imageModel + orientation: ListView.Horizontal + snapMode: ListView.SnapOneItem + + delegate: Item { + width: listView.width + height: listView.height + + Image { + anchors.fill: parent + source: url + fillMode: Image.PreserveAspectFit + } + + Text { + text: supplier.name + "\n" + supplier.url + width: parent.width + anchors.bottom: parent.bottom + } + } + } + //! [ImageModel] + + //! [Supplier] + Supplier { + id: placeSupplier + name: "Example" + url: "http://www.example.com/" + } + + Text { + text: "This place is was provided by " + placeSupplier.name + "\n" + placeSupplier.url + } + //! [Supplier] + //! [Ratings] Text { text: "This place is rated " + place.ratings.average + " out of " + place.ratings.maximum + " stars." @@ -225,7 +331,6 @@ Item { } //! [ContactDetails write multiple] - //! [ContactDetails phoneList] ListView { model: place.contactDetails.phone; |