From 983b9729f18b1ab1d4734663dc15b4f79ffb08fb Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Fri, 2 Sep 2022 16:40:45 +0200 Subject: Register QGeoManeuver declaratively Amend da10ee9b67aaf0c9218c2b891efa06b323866470 to register QGeoManeuver also via Foreign types (both as a value type and a namespace), using declarative type registration and generated plugin sources. Rename the QML type to routeManeuver to follow naming convention. Pick-to: 6.2 Change-Id: I98257c0ef4389e4de225c933425740a82161d5df Reviewed-by: Mitch Curtis --- src/location/doc/snippets/declarative/routing.qml | 6 ++--- src/location/doc/src/maps.qdoc | 4 ++-- src/location/doc/src/plugins/mapbox.qdoc | 2 +- src/location/doc/src/qml-maps.qdoc | 2 +- src/location/maps/qgeomaneuver.cpp | 28 +++++++++++------------ 5 files changed, 21 insertions(+), 21 deletions(-) (limited to 'src/location') diff --git a/src/location/doc/snippets/declarative/routing.qml b/src/location/doc/snippets/declarative/routing.qml index ae564704..3027b22b 100644 --- a/src/location/doc/snippets/declarative/routing.qml +++ b/src/location/doc/snippets/declarative/routing.qml @@ -99,15 +99,15 @@ Item { Text { text: (1 + index) + "." } Text { text: hasManeuver ? modelData.maneuver.instructionText : "" } //! [Route Maneuver List2] - property RouteManeuver routeManeuver: modelData.maneuver + property routeManeuver routeManeuver: modelData.maneuver property RouteSegment routeSegment: modelData - //! [RouteManeuver] + //! [routeManeuver] Text { text: "Distance till next maneuver: " + routeManeuver.distanceToNextInstruction + " meters, estimated time: " + routeManeuver.timeToNextInstruction + " seconds." } - //! [RouteManeuver] + //! [routeManeuver] //! [RouteSegment] Text { diff --git a/src/location/doc/src/maps.qdoc b/src/location/doc/src/maps.qdoc index d929b125..edddbb4f 100644 --- a/src/location/doc/src/maps.qdoc +++ b/src/location/doc/src/maps.qdoc @@ -160,7 +160,7 @@ Routing is the determination of a navigable path from one point to another on a map. Given a map that is aware of features that aid or hinder navigation, such as bridges, waterways and so on, a series of segments that make up the journey can be constructed. If these \l {RouteSegment}s are simple then we can -add navigation information at the connecting points, \l {RouteManeuver}s, +add navigation information at the connecting points, \l {routeManeuver}s, between the segments. \b{Key Types} @@ -172,7 +172,7 @@ between the segments. \li \l{QtLocation::RouteSegment}{RouteSegment} \li The individual components of a route. \row - \li \l{QtLocation::RouteManeuver}{RouteManeuver} + \li \l{QtLocation::routeManeuver}{routeManeuver} \li The navigation information that joins segments. \row \li \l{QtLocation::RouteModel}{RouteModel} diff --git a/src/location/doc/src/plugins/mapbox.qdoc b/src/location/doc/src/plugins/mapbox.qdoc index 3933b107..572ba8f2 100644 --- a/src/location/doc/src/plugins/mapbox.qdoc +++ b/src/location/doc/src/plugins/mapbox.qdoc @@ -165,7 +165,7 @@ The following table lists optional parameters that can be passed to the Mapbox p \section1 Extra routing attributes -When using this plugin, the RouteManeuver objects in the returned route may contain additional extended attributes (see \l RouteManeuver::extendedAttributes), +When using this plugin, the routeManeuver objects in the returned route may contain additional extended attributes (see \l routeManeuver::extendedAttributes), where available. These attributes are described in detail in the official \l{https://www.mapbox.com/api-documentation/#stepmaneuver-object}{Mapbox direction API documentation}. */ diff --git a/src/location/doc/src/qml-maps.qdoc b/src/location/doc/src/qml-maps.qdoc index 5e9c1162..2b160487 100644 --- a/src/location/doc/src/qml-maps.qdoc +++ b/src/location/doc/src/qml-maps.qdoc @@ -131,7 +131,7 @@ To find a suitable route we will need to use a \l RouteQuery to define the selection criteria and adding any required waypoints. The \l RouteModel should return a list of \l {RouteSegment}s that defines the route to the destination complete with navigation advice at the joins between -segments, called \l {RouteManeuver}s +segments, called \l {routeManeuver}s There are many options that you can add to the query to narrow the criteria. The \l RouteQuery properties can include diff --git a/src/location/maps/qgeomaneuver.cpp b/src/location/maps/qgeomaneuver.cpp index f50f6c8d..a841e543 100644 --- a/src/location/maps/qgeomaneuver.cpp +++ b/src/location/maps/qgeomaneuver.cpp @@ -75,19 +75,19 @@ QT_DEFINE_QSDP_SPECIALIZATION_DTOR(QGeoManeuverPrivate) */ /*! - \qmltype RouteManeuver + \qmltype routeManeuver \inqmlmodule QtLocation \ingroup qml-QtLocation5-routing \since QtLocation 5.5 - \brief The RouteManeuver type represents the information relevant to the + \brief The routeManeuver type represents the information relevant to the point at which two RouteSegments meet. RouteSegment instances can be thought of as edges on a routing - graph, with RouteManeuver instances as optional labels attached to the + graph, with routeManeuver instances as optional labels attached to the vertices of the graph. - The most interesting information held in a RouteManeuver instance is + The most interesting information held in a routeManeuver instance is normally the textual navigation to provide and the position at which to provide it, accessible by \l instructionText and \l position respectively. @@ -99,7 +99,7 @@ QT_DEFINE_QSDP_SPECIALIZATION_DTOR(QGeoManeuverPrivate) \snippet declarative/routing.qml QtQuick import \snippet declarative/maps.qml QtLocation import \codeline - \snippet declarative/routing.qml RouteManeuver + \snippet declarative/routing.qml routeManeuver */ /*! @@ -199,7 +199,7 @@ bool QGeoManeuver::isEqual(const QGeoManeuver &other) const } /*! - \qmlproperty bool RouteManeuver::valid + \qmlproperty bool routeManeuver::valid This read-only property holds whether this maneuver is valid or not. @@ -220,7 +220,7 @@ bool QGeoManeuver::isValid() const } /*! - \qmlproperty coordinate RouteManeuver::position + \qmlproperty coordinate routeManeuver::position This read-only property holds where the \l instructionText should be displayed. @@ -242,7 +242,7 @@ QGeoCoordinate QGeoManeuver::position() const } /*! - \qmlproperty string RouteManeuver::instructionText + \qmlproperty string routeManeuver::instructionText This read-only property holds textual navigation instruction. */ @@ -263,10 +263,10 @@ QString QGeoManeuver::instructionText() const } /*! - \qmlproperty enumeration RouteManeuver::direction + \qmlproperty enumeration routeManeuver::direction Describes the change in direction associated with the instruction text - that is associated with a RouteManeuver. + that is associated with a routeManeuver. \list \li RouteManeuver.NoDirection - There is no direction associated with the instruction text @@ -300,7 +300,7 @@ QGeoManeuver::InstructionDirection QGeoManeuver::direction() const } /*! - \qmlproperty int RouteManeuver::timeToNextInstruction + \qmlproperty int routeManeuver::timeToNextInstruction This read-only property holds the estimated time, in seconds, that it will take to travel from the point at which the associated instruction was issued @@ -325,7 +325,7 @@ int QGeoManeuver::timeToNextInstruction() const } /*! - \qmlproperty real RouteManeuver::distanceToNextInstruction + \qmlproperty real routeManeuver::distanceToNextInstruction This read-only property holds the distance, in meters, between the point at which the associated instruction was issued and the point that the next instruction should @@ -349,7 +349,7 @@ qreal QGeoManeuver::distanceToNextInstruction() const } /*! - \qmlproperty coordinate RouteManeuver::waypoint + \qmlproperty coordinate routeManeuver::waypoint This property holds the waypoint associated with this maneuver. Not all maneuvers have a waypoint associated with them. @@ -374,7 +374,7 @@ QGeoCoordinate QGeoManeuver::waypoint() const } /*! - \qmlproperty Object RouteManeuver::extendedAttributes + \qmlproperty Object routeManeuver::extendedAttributes This property holds the extended attributes of the maneuver and is a map. These attributes are plugin specific, and can be empty. -- cgit v1.2.1