summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2012-06-20 10:52:01 +1000
committerQt by Nokia <qt-info@nokia.com>2012-06-21 05:32:45 +0200
commit1c7061718828f26ac0424e6f3b17b04ddb4beaea (patch)
tree8d176ac8656058a07eec381d5e4650899d43eb9d /examples
parentd586c9a22462b170b495aca0469462b4f9f5784f (diff)
downloadqtlocation-1c7061718828f26ac0424e6f3b17b04ddb4beaea.tar.gz
Fix up documentation.
- Fix snippet inclusion, incorrect path. - Remove duplicate code from docs, use snippets from examples instead. - Fix broken links. - Missing C++ class in QML docs. - \bold -> \b - Fix qdoc warning about \qmlslot and \qmlmethod. - These slots don't need to be slots, change them to Q_INVOKABLES and document them as \qmlmethod. - Remove unneeded signal documentation, it is covered by the property documentation. Change-Id: I19aa35d7db999057f7e647bd61371332ab26170f Reviewed-by: Ian Chen <ian.1.chen@nokia.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/declarative/mapviewer/content/map/MapComponent.qml21
-rw-r--r--examples/declarative/mapviewer/mapviewer.qml6
2 files changed, 14 insertions, 13 deletions
diff --git a/examples/declarative/mapviewer/content/map/MapComponent.qml b/examples/declarative/mapviewer/content/map/MapComponent.qml
index 4074b15e..c61beb43 100644
--- a/examples/declarative/mapviewer/content/map/MapComponent.qml
+++ b/examples/declarative/mapviewer/content/map/MapComponent.qml
@@ -54,7 +54,6 @@ Map {
// And flicking gestures for quick panning
flick.enabled: true
flick.deceleration: 3000
-
//! [top]
property variant markers
@@ -240,19 +239,18 @@ Map {
routeInfoModel.update()
break
}
- }
-//! [routemodel1]
- else if (status == RouteModel.Error) {
+ } else if (status == RouteModel.Error) {
clearAll()
map.routeError()
}
-//! [routemodel2]
}
-//! [routemodel2]
+//! [routemodel1]
+//! [routemodel2]
function clearAll() {
routeInfoModel.update()
}
+//! [routemodel2]
//! [routemodel3]
}
//! [routemodel3]
@@ -260,9 +258,11 @@ Map {
//! [geocodemodel0]
property GeocodeModel geocodeModel: GeocodeModel {
//! [geocodemodel0]
- plugin : map.plugin;
- onStatusChanged:{
- if ((status == GeocodeModel.Ready) || (status == GeocodeModel.Error)) map.geocodeFinished()
+//! [geocodemodel0 body]
+ plugin: map.plugin
+ onStatusChanged: {
+ if ((status == GeocodeModel.Ready) || (status == GeocodeModel.Error))
+ map.geocodeFinished()
}
onLocationsChanged:
{
@@ -270,8 +270,8 @@ Map {
map.center.latitude = get(0).coordinate.latitude
map.center.longitude = get(0).coordinate.longitude
}
-
}
+//! [geocodemodel0 body]
//! [geocodemodel1]
}
//! [geocodemodel1]
@@ -479,7 +479,6 @@ Map {
//! [routeinfomodel]
//! [routeview]
-
MapItemView {
model: routeModel
delegate: routeDelegate
diff --git a/examples/declarative/mapviewer/mapviewer.qml b/examples/declarative/mapviewer/mapviewer.qml
index 82c6740a..9d4aed93 100644
--- a/examples/declarative/mapviewer/mapviewer.qml
+++ b/examples/declarative/mapviewer/mapviewer.qml
@@ -342,8 +342,8 @@ Item {
page.state = ""
}
- function calculateRoute() {
//! [routerequest0]
+ function calculateRoute() {
// clear away any old data in the query
map.routeQuery.clearWaypoints();
@@ -353,6 +353,8 @@ Item {
map.routeQuery.travelModes = routeDialog.travelMode
map.routeQuery.routeOptimizations = routeDialog.routeOptimization
//! [routerequest0]
+
+//! [routerequest0 feature weight]
for (var i=0; i<9; i++) {
map.routeQuery.setFeatureWeight(i, 0)
}
@@ -360,6 +362,7 @@ Item {
for (var i=0; i<routeDialog.features.length; i++) {
map.routeQuery.setFeatureWeight(routeDialog.features[i], RouteQuery.AvoidFeatureWeight)
}
+//! [routerequest0 feature weight]
//! [routerequest1]
map.routeModel.update();
@@ -387,7 +390,6 @@ Item {
}
//! [geocode1]
-
Address {
id: geocodeAddress
}