summaryrefslogtreecommitdiff
path: root/src/location/declarativemaps/qdeclarativegeomap_p.h
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2017-02-10 19:05:56 +0100
committerPaolo Angelelli <paolo.angelelli@qt.io>2017-02-28 11:09:56 +0000
commitba2a82b7db86d96fc1f110b4bbc88408f47a5774 (patch)
tree66bb4e03d6cff164cac4161b4363e3444a78ad23 /src/location/declarativemaps/qdeclarativegeomap_p.h
parent11e6a62957433843816b41ad11fada7ca8eab85c (diff)
downloadqtlocation-ba2a82b7db86d96fc1f110b4bbc88408f47a5774.tar.gz
Make QGeoCameraCapabilities independent of the engine
This patch makes it possible to change QGeoCameraCapabilites at runtime, when the map type changes, to accommodate for those plugins that offer different maps having different capabilities. This is then used to properly push the min/max zoom levels for each map type in our OSM plugin. Autotests are included. Change-Id: I48532da77ffb3eaf2e752561395945c3a2c21985 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.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/location/declarativemaps/qdeclarativegeomap_p.h b/src/location/declarativemaps/qdeclarativegeomap_p.h
index a7519a48..f69ca6a1 100644
--- a/src/location/declarativemaps/qdeclarativegeomap_p.h
+++ b/src/location/declarativemaps/qdeclarativegeomap_p.h
@@ -54,6 +54,7 @@
#include <QtLocation/private/qdeclarativegeomapitemgroup_p.h>
#include <QtLocation/qgeoserviceprovider.h>
#include <QtLocation/private/qgeocameradata_p.h>
+#include <QtLocation/private/qgeocameracapabilities_p.h>
#include <QtQuick/QQuickItem>
#include <QtCore/QList>
#include <QtCore/QPointer>
@@ -111,10 +112,10 @@ public:
void setActiveMapType(QDeclarativeGeoMapType *mapType);
QDeclarativeGeoMapType *activeMapType() const;
- void setMinimumZoomLevel(qreal minimumZoomLevel);
+ void setMinimumZoomLevel(qreal minimumZoomLevel, bool userSet = true);
qreal minimumZoomLevel() const;
- void setMaximumZoomLevel(qreal maximumZoomLevel);
+ void setMaximumZoomLevel(qreal maximumZoomLevel, bool userSet = true);
qreal maximumZoomLevel() const;
void setZoomLevel(qreal zoomLevel);
@@ -227,6 +228,7 @@ private Q_SLOTS:
void pluginReady();
void onMapChildrenChanged();
void onSupportedMapTypesChanged();
+ void onCameraCapabilitiesChanged(const QGeoCameraCapabilities &oldCameraCapabilities);
private:
void setupMapView(QDeclarativeGeoMapItemView *view);
@@ -258,6 +260,9 @@ private:
double m_maximumViewportLatitude;
bool m_initialized;
QList<QDeclarativeGeoMapParameter *> m_mapParameters;
+ QGeoCameraCapabilities m_cameraCapabilities;
+ qreal m_userMinimumZoomLevel;
+ qreal m_userMaximumZoomLevel;
friend class QDeclarativeGeoMapItem;
friend class QDeclarativeGeoMapItemView;