summaryrefslogtreecommitdiff
path: root/src/positioning/qgeopath.h
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2017-05-30 15:28:14 +0200
committerPaolo Angelelli <paolo.angelelli@qt.io>2017-06-07 11:12:51 +0000
commite8dedcd7c621715813b7b954bb7f64c88aa6523d (patch)
tree087f958ceaa0cb920eb889389afa291454ca09ab /src/positioning/qgeopath.h
parentf55629245259ba7364e258f92408823024423caa (diff)
downloadqtlocation-e8dedcd7c621715813b7b954bb7f64c88aa6523d.tar.gz
Add QGeoPath::size
A way to retrieve the size of the path is missing, as the path property turns out not to be accessible to QML. This patch adds a Q_INVOKABLE method to expose it. [ChangeLog][QtPositioning][QGeoPath] Add ::size() to QGeoPath to retrieve the number of coordinates in the path. Change-Id: Ifa7a640113cba71f23e36626a84c8b2fe473a07e Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/positioning/qgeopath.h')
-rw-r--r--src/positioning/qgeopath.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/positioning/qgeopath.h b/src/positioning/qgeopath.h
index 09a53a49..ad41c23c 100644
--- a/src/positioning/qgeopath.h
+++ b/src/positioning/qgeopath.h
@@ -78,6 +78,7 @@ public:
Q_INVOKABLE void translate(double degreesLatitude, double degreesLongitude);
Q_INVOKABLE QGeoPath translated(double degreesLatitude, double degreesLongitude) const;
Q_INVOKABLE double length(int indexFrom = 0, int indexTo = -1) const;
+ Q_INVOKABLE int size() const;
Q_INVOKABLE void addCoordinate(const QGeoCoordinate &coordinate);
Q_INVOKABLE void insertCoordinate(int index, const QGeoCoordinate &coordinate);
Q_INVOKABLE void replaceCoordinate(int index, const QGeoCoordinate &coordinate);