summaryrefslogtreecommitdiff
path: root/src/location/maps
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2018-12-06 13:34:49 +0100
committerPaolo Angelelli <paolo.angelelli@qt.io>2018-12-11 00:14:39 +0000
commit56e07f78579196fc33580ca5f20073a156b0e2dd (patch)
tree5a572f0a8a2028a6fceb57823c359ca6fecea16b /src/location/maps
parentc8658686cddee13563aca337c4172a9864caefda (diff)
downloadqtlocation-56e07f78579196fc33580ca5f20073a156b0e2dd.tar.gz
Add Map.fitViewportToGeoShape(shape, margins)
This method extends the functionality of setting the visibleRegion, by also allowing to specify the margins in pixels. Task-number: QTBUG-69640 Change-Id: I196d0410782992ad2ac954aa08e226521b87ba7b Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/location/maps')
-rw-r--r--src/location/maps/qgeomap.cpp3
-rw-r--r--src/location/maps/qgeomap_p.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/location/maps/qgeomap.cpp b/src/location/maps/qgeomap.cpp
index 963ef6bd..bf5e557d 100644
--- a/src/location/maps/qgeomap.cpp
+++ b/src/location/maps/qgeomap.cpp
@@ -135,9 +135,10 @@ bool QGeoMap::anchorCoordinateToPoint(const QGeoCoordinate &coordinate, const QP
return false;
}
-bool QGeoMap::fitViewportToGeoRectangle(const QGeoRectangle &rectangle)
+bool QGeoMap::fitViewportToGeoRectangle(const QGeoRectangle &rectangle, const QMargins &borders)
{
Q_UNUSED(rectangle)
+ Q_UNUSED(borders)
return false;
}
diff --git a/src/location/maps/qgeomap_p.h b/src/location/maps/qgeomap_p.h
index 874b300f..c0af9e10 100644
--- a/src/location/maps/qgeomap_p.h
+++ b/src/location/maps/qgeomap_p.h
@@ -150,7 +150,7 @@ public:
virtual bool setBearing(qreal bearing, const QGeoCoordinate &coordinate);
virtual QGeoShape visibleRegion() const;
virtual bool anchorCoordinateToPoint(const QGeoCoordinate &coordinate, const QPointF &anchorPoint);
- virtual bool fitViewportToGeoRectangle(const QGeoRectangle &rectangle);
+ virtual bool fitViewportToGeoRectangle(const QGeoRectangle &rectangle, const QMargins &borders);
virtual void setCopyrightVisible(bool visible);
virtual void removeMapObject(QGeoMapObject *obj);