summaryrefslogtreecommitdiff
path: root/src/imports/positioning/locationsingleton.cpp
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@theqtcompany.com>2015-05-21 13:30:28 +0200
committerAlex Blasche <alexander.blasche@theqtcompany.com>2015-05-26 13:29:42 +0000
commit046eec04fb47dee9a1802503004446d1fe777874 (patch)
tree9031a5a971fb89e527b68910aa5737ae612e51e8 /src/imports/positioning/locationsingleton.cpp
parent9c61ad227761c9f83ea441c6a8db2d570a4009a3 (diff)
downloadqtlocation-046eec04fb47dee9a1802503004446d1fe777874.tar.gz
Provide means to convert GeoShape to appropriate subclass in QML
Change-Id: I1f0d1540b07af8f385ef670990a8669ec8c973d8 Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src/imports/positioning/locationsingleton.cpp')
-rw-r--r--src/imports/positioning/locationsingleton.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/imports/positioning/locationsingleton.cpp b/src/imports/positioning/locationsingleton.cpp
index 6c1a8683..bb53bc9f 100644
--- a/src/imports/positioning/locationsingleton.cpp
+++ b/src/imports/positioning/locationsingleton.cpp
@@ -172,3 +172,29 @@ QGeoCircle LocationSingleton::circle(const QGeoCoordinate &center, qreal radius)
return QGeoCircle(center, radius);
}
+/*!
+ \qmlmethod geocircle QtPositioning::shapeToCircle(geoshape shape) const
+
+ Converts \a shape to a geocircle.
+
+ \sa {geocircle}
+ \since 5.5
+*/
+QGeoCircle LocationSingleton::shapeToCircle(const QGeoShape &shape) const
+{
+ return QGeoCircle(shape);
+}
+
+/*!
+ \qmlmethod georectangle QtPositioning::shapeToRectangle(geoshape shape) const
+
+ Converts \a shape to a georectangle.
+
+ \sa {georectangle}
+ \since 5.5
+*/
+QGeoRectangle LocationSingleton::shapeToRectangle(const QGeoShape &shape) const
+{
+ return QGeoRectangle(shape);
+}
+