summaryrefslogtreecommitdiff
path: root/src/location/declarativemaps/qdeclarativepolylinemapitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/location/declarativemaps/qdeclarativepolylinemapitem.cpp')
-rw-r--r--src/location/declarativemaps/qdeclarativepolylinemapitem.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/location/declarativemaps/qdeclarativepolylinemapitem.cpp b/src/location/declarativemaps/qdeclarativepolylinemapitem.cpp
index 2c6d3ba4..a97271aa 100644
--- a/src/location/declarativemaps/qdeclarativepolylinemapitem.cpp
+++ b/src/location/declarativemaps/qdeclarativepolylinemapitem.cpp
@@ -494,6 +494,27 @@ void QDeclarativePolylineMapItem::setPath(const QJSValue &value)
}
/*!
+ \qmlmethod int MapPolyline::setPath(geopath path)
+
+ Sets the \l path using a \l QGeoPath type.
+
+ \since 5.10
+
+ \sa path
+*/
+void QDeclarativePolylineMapItem::setPath(const QGeoPath &path)
+{
+ if (geopath_.path() == path.path())
+ return;
+
+ geopath_ = path;
+ regenerateCache();
+ geometry_.setPreserveGeometry(true, geopath_.boundingGeoRectangle().topLeft());
+ markSourceDirtyAndUpdate();
+ emit pathChanged();
+}
+
+/*!
\internal
*/
void QDeclarativePolylineMapItem::setPathFromGeoList(const QList<QGeoCoordinate> &path)