From 9e566cc5035493a7be8f7496bed57fe6e4060b2d Mon Sep 17 00:00:00 2001 From: Paolo Angelelli Date: Tue, 30 May 2017 16:51:15 +0200 Subject: Add TrafficFeature to QGeoRouteRequest/RouteQuery [ChangeLog][QtLocation][QGeoRouteRequest/RouteQuery] Add TrafficFeature to the query features. Change-Id: I50243865da97e302943f43b0eda430e9d8383880 Reviewed-by: Alex Blasche --- src/location/declarativemaps/qdeclarativegeoroutemodel.cpp | 1 + src/location/declarativemaps/qdeclarativegeoroutemodel_p.h | 3 ++- src/location/maps/qgeorouterequest.cpp | 2 ++ src/location/maps/qgeorouterequest.h | 3 ++- src/plugins/geoservices/nokia/qgeoroutingmanagerengine_nokia.cpp | 1 + 5 files changed, 8 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/location/declarativemaps/qdeclarativegeoroutemodel.cpp b/src/location/declarativemaps/qdeclarativegeoroutemodel.cpp index 94bd63c8..0383c0c4 100644 --- a/src/location/declarativemaps/qdeclarativegeoroutemodel.cpp +++ b/src/location/declarativemaps/qdeclarativegeoroutemodel.cpp @@ -722,6 +722,7 @@ void QDeclarativeGeoRouteQuery::componentComplete() \li RouteQuery.DirtRoadFeature - Consider dirt roads when planning the route \li RouteQuery.ParksFeature - Consider parks when planning the route \li RouteQuery.MotorPoolLaneFeature - Consider motor pool lanes when planning the route + \li RouteQuery.TrafficFeature - Consider traffic when planning the route \endlist \sa setFeatureWeight, featureWeight diff --git a/src/location/declarativemaps/qdeclarativegeoroutemodel_p.h b/src/location/declarativemaps/qdeclarativegeoroutemodel_p.h index 3dfd2ce6..18486ac8 100644 --- a/src/location/declarativemaps/qdeclarativegeoroutemodel_p.h +++ b/src/location/declarativemaps/qdeclarativegeoroutemodel_p.h @@ -238,7 +238,8 @@ public: TunnelFeature = QGeoRouteRequest::TunnelFeature, DirtRoadFeature = QGeoRouteRequest::DirtRoadFeature, ParksFeature = QGeoRouteRequest::ParksFeature, - MotorPoolLaneFeature = QGeoRouteRequest::MotorPoolLaneFeature + MotorPoolLaneFeature = QGeoRouteRequest::MotorPoolLaneFeature, + TrafficFeature = QGeoRouteRequest::TrafficFeature }; Q_DECLARE_FLAGS(FeatureTypes, FeatureType) diff --git a/src/location/maps/qgeorouterequest.cpp b/src/location/maps/qgeorouterequest.cpp index 753d2ee9..a1b32d85 100644 --- a/src/location/maps/qgeorouterequest.cpp +++ b/src/location/maps/qgeorouterequest.cpp @@ -134,6 +134,8 @@ QT_BEGIN_NAMESPACE Consider parks when planning the route. \value MotorPoolLaneFeature Consider motor pool lanes when planning the route. + \value TrafficFeature + Consider the current traffic situation when planning the route. Since QtLocation 5.10 */ /*! diff --git a/src/location/maps/qgeorouterequest.h b/src/location/maps/qgeorouterequest.h index 6fcc7ad3..cf89d13d 100644 --- a/src/location/maps/qgeorouterequest.h +++ b/src/location/maps/qgeorouterequest.h @@ -70,7 +70,8 @@ public: TunnelFeature = 0x00000010, DirtRoadFeature = 0x00000020, ParksFeature = 0x00000040, - MotorPoolLaneFeature = 0x00000080 + MotorPoolLaneFeature = 0x00000080, + TrafficFeature = 0x00000100 }; Q_DECLARE_FLAGS(FeatureTypes, FeatureType) diff --git a/src/plugins/geoservices/nokia/qgeoroutingmanagerengine_nokia.cpp b/src/plugins/geoservices/nokia/qgeoroutingmanagerengine_nokia.cpp index a33d1ba8..d7e4cf8d 100644 --- a/src/plugins/geoservices/nokia/qgeoroutingmanagerengine_nokia.cpp +++ b/src/plugins/geoservices/nokia/qgeoroutingmanagerengine_nokia.cpp @@ -360,6 +360,7 @@ QString QGeoRoutingManagerEngineNokia::modesRequestString(const QGeoRouteRequest case QGeoRouteRequest::PublicTransitFeature: case QGeoRouteRequest::ParksFeature: case QGeoRouteRequest::MotorPoolLaneFeature: + case QGeoRouteRequest::TrafficFeature: case QGeoRouteRequest::NoFeature: break; } -- cgit v1.2.1