summaryrefslogtreecommitdiff
path: root/src/positioning/qgeocircle_p.h
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2016-08-05 22:21:12 +0200
committerPaolo Angelelli <paolo.angelelli@qt.io>2016-11-30 08:54:11 +0000
commitcd8880cc04b22610e835e6cc02cc16ac22ec9fae (patch)
tree37a5569c4eca55f70d5584f54fa2479dcf9dad3c /src/positioning/qgeocircle_p.h
parent0a552f285fdc3760d9755109ceef3b87392a308d (diff)
downloadqtlocation-cd8880cc04b22610e835e6cc02cc16ac22ec9fae.tar.gz
Add support for boundingGeoRectangle to QGeoShape
this patch introduces QGeoShape::boundingGeoRectangle, which returns a QGeoRectangle containing the latitudinal/longitudinal bounds of a geoshape. The bounding geo rectangle is projection independent, as it returns a georectangle containing the min/max latitudes/longitudes of the shape. Change-Id: Ie3a83ec41f87ea3753899d2278e664fe2469f778 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/positioning/qgeocircle_p.h')
-rw-r--r--src/positioning/qgeocircle_p.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/positioning/qgeocircle_p.h b/src/positioning/qgeocircle_p.h
index 311aba8b..07d79db4 100644
--- a/src/positioning/qgeocircle_p.h
+++ b/src/positioning/qgeocircle_p.h
@@ -70,6 +70,14 @@ public:
QGeoCoordinate center() const Q_DECL_OVERRIDE;
+ QGeoRectangle boundingGeoRectangle() const Q_DECL_OVERRIDE;
+
+ bool crossNorthPole() const;
+ bool crossSouthPole() const;
+ void updateBoundingBox();
+ void setCenter(const QGeoCoordinate &c);
+ void setRadius(const qreal r);
+
void extendShape(const QGeoCoordinate &coordinate) Q_DECL_OVERRIDE;
QGeoShapePrivate *clone() const Q_DECL_OVERRIDE;
@@ -77,7 +85,8 @@ public:
bool operator==(const QGeoShapePrivate &other) const Q_DECL_OVERRIDE;
QGeoCoordinate m_center;
- qreal radius;
+ qreal m_radius;
+ QGeoRectangle m_bbox;
};
QT_END_NAMESPACE