diff options
author | Paolo Angelelli <paolo.angelelli@qt.io> | 2017-02-10 19:05:56 +0100 |
---|---|---|
committer | Paolo Angelelli <paolo.angelelli@qt.io> | 2017-02-28 11:09:56 +0000 |
commit | ba2a82b7db86d96fc1f110b4bbc88408f47a5774 (patch) | |
tree | 66bb4e03d6cff164cac4161b4363e3444a78ad23 /src/plugins/geoservices/osm/qgeotileproviderosm.h | |
parent | 11e6a62957433843816b41ad11fada7ca8eab85c (diff) | |
download | qtlocation-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/plugins/geoservices/osm/qgeotileproviderosm.h')
-rw-r--r-- | src/plugins/geoservices/osm/qgeotileproviderosm.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/geoservices/osm/qgeotileproviderosm.h b/src/plugins/geoservices/osm/qgeotileproviderosm.h index b8647244..54f8049d 100644 --- a/src/plugins/geoservices/osm/qgeotileproviderosm.h +++ b/src/plugins/geoservices/osm/qgeotileproviderosm.h @@ -38,7 +38,7 @@ #define QTILEPROVIDEROSM_H #include <QtLocation/private/qgeomaptype_p.h> - +#include <QtLocation/private/qgeocameracapabilities_p.h> #include <QtCore/QUrl> #include <QtCore/QVector> #include <QtNetwork/QNetworkAccessManager> @@ -142,7 +142,8 @@ public: QGeoTileProviderOsm(QNetworkAccessManager *nm, const QGeoMapType &mapType, - const QVector<TileProvider *> &providers); + const QVector<TileProvider *> &providers, + const QGeoCameraCapabilities &cameraCapabilities); ~QGeoTileProviderOsm(); QUrl tileAddress(int x, int y, int z) const; @@ -157,6 +158,7 @@ public: bool isValid() const; bool isResolved() const; const QDateTime timestamp() const; + QGeoCameraCapabilities cameraCapabilities() const; Q_SIGNALS: void resolutionFinished(const QGeoTileProviderOsm *provider); @@ -170,6 +172,7 @@ public Q_SLOTS: protected Q_SLOTS: void onResolutionFinished(TileProvider *provider); void onResolutionError(TileProvider *provider); + void updateCameraCapabilities(); protected: void addProvider(TileProvider *provider); @@ -182,6 +185,7 @@ protected: int m_providerId; QGeoMapType m_mapType; Status m_status; + QGeoCameraCapabilities m_cameraCapabilities; }; QT_END_NAMESPACE |