summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2023-02-20 15:59:04 +0100
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2023-02-21 04:50:32 +0100
commit7580137c8fd295ba1b3abd3199cf9eb4fd949690 (patch)
tree64f1815e008f049ceb5704c16a982b5a2d6332b1
parent992f57fcf993b9804dcda9b12bf4d67ed102f284 (diff)
Improve documentation and fix warnings and examples
- Waypoint was removed in bf12a34712d14d382b410b5ba5154eba90963675, so remove the documentation for the QML type - document the icon QML type from the Places module - remove dead code from example - adjust snippet quoting to changes - fix some qdoc warnings Pick-to: 6.5 Change-Id: I8ee2b55d8a48afa6f700be1edab06f2364c6ff04 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
-rw-r--r--examples/location/minimal_map/doc/src/minimal_map.qdoc6
-rw-r--r--examples/location/minimal_map/main.qml7
-rw-r--r--src/location/declarativemaps/qdeclarativegeoroutemodel.cpp73
-rw-r--r--src/location/maps/MapView.qml2
-rw-r--r--src/location/places/qplaceicon.cpp26
-rw-r--r--src/location/quickmapitems/qdeclarativegeomap.cpp9
6 files changed, 35 insertions, 88 deletions
diff --git a/examples/location/minimal_map/doc/src/minimal_map.qdoc b/examples/location/minimal_map/doc/src/minimal_map.qdoc
index 24b89247..533ac79d 100644
--- a/examples/location/minimal_map/doc/src/minimal_map.qdoc
+++ b/examples/location/minimal_map/doc/src/minimal_map.qdoc
@@ -41,11 +41,7 @@ it visible. The window will be filled by a \l [QML]{Map} item showing the map.
\quotefromfile minimal_map/main.qml
\skipto import
-\printuntil }
-\printline }
-\skipto Map
-\printuntil }
-\printline }
+\printuntil
The \l [QML]{Plugin} item is necessary to define the map provider we are
going to use. The example can work with any of the available geo services
diff --git a/examples/location/minimal_map/main.qml b/examples/location/minimal_map/main.qml
index 3ddee45c..d536943e 100644
--- a/examples/location/minimal_map/main.qml
+++ b/examples/location/minimal_map/main.qml
@@ -14,12 +14,7 @@ Window {
Plugin {
id: mapPlugin
- name: "osm" // "maplibregl", "esri", ...
- // specify plugin parameters if necessary
- // PluginParameter {
- // name:
- // value:
- // }
+ name: "osm"
}
Map {
diff --git a/src/location/declarativemaps/qdeclarativegeoroutemodel.cpp b/src/location/declarativemaps/qdeclarativegeoroutemodel.cpp
index dedcd396..b5012cc4 100644
--- a/src/location/declarativemaps/qdeclarativegeoroutemodel.cpp
+++ b/src/location/declarativemaps/qdeclarativegeoroutemodel.cpp
@@ -725,7 +725,6 @@ void QDeclarativeGeoRouteQuery::setNumberAlternativeRoutes(int numberAlternative
/*!
\qmlproperty list<coordinate> RouteQuery::waypoints
-
The coordinates of the waypoints for the desired route.
The waypoints should be given in order from origin to destination.
Two or more coordinates are needed.
@@ -733,13 +732,6 @@ void QDeclarativeGeoRouteQuery::setNumberAlternativeRoutes(int numberAlternative
Waypoints can be set as part of the RouteQuery type declaration or
dynamically with the functions provided.
- When setting this property to a list of waypoints, each waypoint
- can be either a \l coordinate or a \l Waypoint, interchangeably.
- If a \l coordinate is passed, it will be internally converted to a
- \l Waypoint.
-
- This property, however, always contains a list of coordinates.
-
\sa addWaypoint, removeWaypoint, clearWaypoints
*/
@@ -869,11 +861,8 @@ void QDeclarativeGeoRouteQuery::clearExcludedAreas()
/*!
\qmlmethod void QtLocation::RouteQuery::addWaypoint(coordinate)
- Appends a coordinate to the list of waypoints. Same coordinate
- can be set multiple times.
- The \a coordinate argument can be a \l coordinate or a \l Waypoint.
- If a \l coordinate is used, it will be internally converted to a
- \l Waypoint.
+ Appends the given \a coordinate to the list of waypoints. The same
+ coordinate can be set multiple times.
\sa removeWaypoint, clearWaypoints
*/
@@ -1271,62 +1260,4 @@ void QDeclarativeGeoRouteQuery::doCoordinateChanged()
emit queryDetailsChanged();
}
-/*!
- \qmltype Waypoint
- \instantiates QDeclarativeGeoWaypoint
- \inqmlmodule QtLocation
- \ingroup qml-QtLocation5-routing
- \since QtLocation 5.11
-
- \brief The Waypoint type provides a mean to specify a waypoint in a \l RouteQuery
- in a more detailed way than by using a simple \l coordinate.
-
- A Waypoint is a type that allows to specify properties of a waypoint in a \l RouteQuery,
- such as the waypoint coordinate, or the angle of approach to the waypoint.
-
- Changing properties of the waypoint or of its nested MapParameteters will cause the containing
- \l RouteQuery to emit the queryDetailsChanged signal.
-
- \section2 Example Usage
-
- \code
- Plugin {
- id: aPlugin
- name: "osm"
- }
-
- Waypoint {
- id: waypointStart
- coordinate: ...
- bearing: ...
- }
- Waypoint {
- id: waypointFinish
- coordinate: ...
- bearing: ...
- }
-
- RouteQuery {
- id: aQuery
- Component.onCompleted: {
- travelModes = RouteQuery.CarTravel
- addWaypoint(waypointStart)
- var aWaypoint = Qt.createQmlObject ('import QtLocation 5.11; Waypoint { ... }', ...)
- addWaypoint(aWaypoint)
- addWaypoint(waypointFinish)
- }
- }
-
- RouteModel {
- id: routeModel
- plugin: aPlugin
- query: aQuery
- autoUpdate: true
- }
- \endcode
-
- \sa RouteQuery
-*/
-
-
QT_END_NAMESPACE
diff --git a/src/location/maps/MapView.qml b/src/location/maps/MapView.qml
index a65778b9..c5051429 100644
--- a/src/location/maps/MapView.qml
+++ b/src/location/maps/MapView.qml
@@ -39,7 +39,7 @@ Item {
property real minimumZoomLevel: map.minimumZoomLevel
/*!
- \qmlproperty real minimumZoomLevel
+ \qmlproperty real maximumZoomLevel
The maximum valid zoom level for the map.
diff --git a/src/location/places/qplaceicon.cpp b/src/location/places/qplaceicon.cpp
index a37434ef..cb6b5c7f 100644
--- a/src/location/places/qplaceicon.cpp
+++ b/src/location/places/qplaceicon.cpp
@@ -48,6 +48,32 @@ bool QPlaceIconPrivate::operator == (const QPlaceIconPrivate &other) const
*/
/*!
+ \qmlvaluetype icon
+ \inqmlmodule QtLocation
+ \ingroup qml-QtLocation5-places
+ \ingroup qml-QtLocation5-places-data
+ \since QtLocation 5.5
+
+ \brief The icon type represents the icon of a place.
+
+ The typical usage of an icon is to use the url() function to specify
+ a preferred icon size.
+
+ The icons are typically backend dependent, if a manager backend does not support a given size, the URL of the icon that most
+ closely matches those parameters is returned.
+
+ The icon class also has a key-value set of parameters. The precise key one
+ needs to use depends on the \l {Qt Location#Plugin References and Parameters}{plugin}
+ being used. These parameters influence which icon URL is returned by
+ the manager and may also be used to specify icon URL locations when
+ saving icons.
+
+ If there is only ever one image for an icon, then QPlaceIcon::SingleUrl can be used as a parameter
+ key with a QUrl as the associated value. If this key is set, then the url() function will always return the specified URL
+ and not defer to any manager.
+*/
+
+/*!
\variable QPlaceIcon::SingleUrl
\brief Parameter key for an icon that only has a single image URL.
diff --git a/src/location/quickmapitems/qdeclarativegeomap.cpp b/src/location/quickmapitems/qdeclarativegeomap.cpp
index c232010b..a257a424 100644
--- a/src/location/quickmapitems/qdeclarativegeomap.cpp
+++ b/src/location/quickmapitems/qdeclarativegeomap.cpp
@@ -114,11 +114,10 @@ static qreal sanitizeBearing(qreal bearing)
\quotefromfile minimal_map/main.qml
\skipto import
- \printuntil }
- \printline }
- \skipto Map
- \printuntil }
- \printline }
+ \printuntil Window {
+ \dots
+ \skipto Plugin
+ \printuntil
\image minimal_map.png
*/