summaryrefslogtreecommitdiff
path: root/src/location/declarativemaps/qdeclarativegeomap_p.h
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/declarativemaps/qdeclarativegeomap_p.h
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/declarativemaps/qdeclarativegeomap_p.h')
-rw-r--r--src/location/declarativemaps/qdeclarativegeomap_p.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/location/declarativemaps/qdeclarativegeomap_p.h b/src/location/declarativemaps/qdeclarativegeomap_p.h
index f59f6f54..3cbefe79 100644
--- a/src/location/declarativemaps/qdeclarativegeomap_p.h
+++ b/src/location/declarativemaps/qdeclarativegeomap_p.h
@@ -198,6 +198,8 @@ public:
Q_INVOKABLE void pan(int dx, int dy);
Q_INVOKABLE void prefetchData(); // optional hint for prefetch
Q_INVOKABLE void clearData();
+ Q_INVOKABLE void fitViewportToGeoShape(const QGeoShape &shape, QVariant margins);
+ void fitViewportToGeoShape(const QGeoShape &shape, const QMargins &borders = QMargins(10, 10, 10, 10));
QString errorString() const;
QGeoServiceProvider::Error error() const;
@@ -278,7 +280,6 @@ private:
void populateMap();
void populateParameters();
void fitViewportToMapItemsRefine(bool refine, bool onlyVisible);
- void fitViewportToGeoShape();
bool isInteractive();
void attachCopyrightNotice(bool initialVisibility);
void detachCopyrightNotice(bool currentVisibility);