From 11da6dec6d47e7670482ed146cced92573cc0b85 Mon Sep 17 00:00:00 2001 From: Paolo Angelelli Date: Tue, 18 Jul 2017 11:26:29 +0200 Subject: Add camera capabilities + metadata to QGeoMapType/QDeclarativeGeoMapType This patch enriches QGeoMapType/QDeclarativeGeoMapType embedding into this object the camera capabilities for this type, that are then exposed via a new QML Type, CameraCapabilities, and custom metadata in form of a QVariantMap, that can be accessed via the new metadata property. [ChangeLog][QtLocation][QDeclarativeGeoMapType] Added CameraCapabilities and metadata properties to QDeclarativeGeoMapType. Task-number: QTBUG-58931 Change-Id: I97a8852fbb3bbac88fdbf0d47e8247ea7ed1f31e Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/imports/location/location.cpp | 7 +- .../declarativemaps/qdeclarativegeomap.cpp | 13 ++- .../declarativemaps/qdeclarativegeomaptype.cpp | 115 ++++++++++++++++++++- .../declarativemaps/qdeclarativegeomaptype_p.h | 30 ++++++ src/location/maps/qgeomappingmanagerengine.cpp | 8 +- src/location/maps/qgeomappingmanagerengine_p.h | 2 +- src/location/maps/qgeomaptype.cpp | 29 ++++-- src/location/maps/qgeomaptype_p.h | 10 +- src/location/maps/qgeomaptype_p_p.h | 9 +- src/plugins/geoservices/esri/geomapsource.cpp | 4 +- src/plugins/geoservices/esri/geomapsource.h | 3 +- .../esri/geotiledmappingmanagerengine_esri.cpp | 15 +-- .../esri/geotiledmappingmanagerengine_esri.h | 2 +- .../qgeomappingmanagerengineitemsoverlay.cpp | 2 +- .../mapbox/qgeotiledmappingmanagerenginemapbox.cpp | 34 +++--- .../mapboxgl/qgeomappingmanagerenginemapboxgl.cpp | 22 ++-- .../nokia/qgeotiledmappingmanagerengine_nokia.cpp | 43 ++++---- .../osm/qgeotiledmappingmanagerengineosm.cpp | 26 ++--- .../osm/qgeotiledmappingmanagerengineosm.h | 1 - .../geoservices/osm/qgeotileproviderosm.cpp | 3 +- tests/auto/declarative_ui/tst_map.qml | 17 ++- tests/auto/declarative_ui/tst_map_maptype.qml | 39 ++++++- .../qgeotiledmappingmanagerengine_test.h | 42 +++----- tests/auto/maptype/tst_maptype.cpp | 72 ++++++++++--- tests/auto/qgeocameratiles/tst_qgeocameratiles.cpp | 6 +- tests/auto/qgeotiledmap/tst_qgeotiledmap.cpp | 1 + 26 files changed, 410 insertions(+), 145 deletions(-) diff --git a/src/imports/location/location.cpp b/src/imports/location/location.cpp index 0a20e5ad..9c89d3b8 100644 --- a/src/imports/location/location.cpp +++ b/src/imports/location/location.cpp @@ -100,7 +100,7 @@ public: int minor = 0; // Register the 5.0 types - // 5.0 is siltent and not advertised + // 5.0 is silent and not advertised qmlRegisterType(uri, major, minor, "Plugin"); qmlRegisterType(uri, major, minor, "PluginParameter"); @@ -175,6 +175,11 @@ public: qmlRegisterType(uri, major, minor, "MapCopyrightNotice"); qmlRegisterType(uri, major, minor, "MapItemGroup"); + // Register the 5.10 types + minor = 10; + qmlRegisterUncreatableType(uri, major, minor, "CameraCapabilities" + , QStringLiteral("CameraCapabilities is not intended instantiable by developer.")); + //registrations below are version independent qRegisterMetaType(); qRegisterMetaType(); diff --git a/src/location/declarativemaps/qdeclarativegeomap.cpp b/src/location/declarativemaps/qdeclarativegeomap.cpp index f5d2bdb5..cb991341 100644 --- a/src/location/declarativemaps/qdeclarativegeomap.cpp +++ b/src/location/declarativemaps/qdeclarativegeomap.cpp @@ -190,7 +190,11 @@ QDeclarativeGeoMap::QDeclarativeGeoMap(QQuickItem *parent) m_activeMapType = new QDeclarativeGeoMapType(QGeoMapType(QGeoMapType::NoMap, tr("No Map"), - tr("No Map"), false, false, 0, QByteArrayLiteral("")), this); + tr("No Map"), + false, false, + 0, + QByteArrayLiteral(""), + QGeoCameraCapabilities()), this); m_cameraData.setCenter(QGeoCoordinate(51.5073,-0.1277)); //London city center m_cameraData.setZoomLevel(8.0); @@ -750,7 +754,12 @@ void QDeclarativeGeoMap::mappingManagerInitialized() } else { m_activeMapType = new QDeclarativeGeoMapType(QGeoMapType(QGeoMapType::NoMap, tr("No Map"), - tr("No Map"), false, false, 0, QByteArrayLiteral("")), this); + tr("No Map"), + false, + false, + 0, + QByteArrayLiteral(""), + QGeoCameraCapabilities()), this); } } diff --git a/src/location/declarativemaps/qdeclarativegeomaptype.cpp b/src/location/declarativemaps/qdeclarativegeomaptype.cpp index 86444aa4..7e40d414 100644 --- a/src/location/declarativemaps/qdeclarativegeomaptype.cpp +++ b/src/location/declarativemaps/qdeclarativegeomaptype.cpp @@ -57,7 +57,8 @@ QT_BEGIN_NAMESPACE QDeclarativeGeoMapType::QDeclarativeGeoMapType(const QGeoMapType mapType, QObject *parent) : QObject(parent), - mapType_(mapType) {} + mapType_(mapType), + cameraCapabilities_(new QDeclarativeGeoCameraCapabilities(mapType.cameraCapabilities(), this)) {} QDeclarativeGeoMapType::~QDeclarativeGeoMapType() {} @@ -131,4 +132,116 @@ bool QDeclarativeGeoMapType::night() const return mapType_.night(); } +/*! + \qmlproperty CameraCapabilities MapType::cameraCapabilities + \since Qt Location 5.10 + + This property holds the camera capabilities for this map type. +*/ +QDeclarativeGeoCameraCapabilities *QDeclarativeGeoMapType::cameraCapabilities() const +{ + return cameraCapabilities_; +} + +/*! + \qmlproperty VariantMap MapType::metadata + \since Qt Location 5.10 + + This property holds optional, extra metadata related to a specific map type. + The content of this property is entirely plugin-specific. +*/ +QVariantMap QDeclarativeGeoMapType::metadata() const +{ + return mapType_.metadata(); +} + +/* + * QDeclarativeGeoCameraCapabilities implementation + */ + +/*! + \qmltype CameraCapabilities + \instantiates QDeclarativeGeoCameraCapabilities + \inherits QObject + \inqmlmodule QtLocation + \ingroup qml-QtLocation5-maps + \since Qt Location 5.10 + + \brief The CameraCapabilities type holds information about the camera capabilities for a specific map type. + + This includes the map minimum and maximum zoom level, minimum and maximum tilt angle and + minimum and maximum field of view. +*/ + +QDeclarativeGeoCameraCapabilities::QDeclarativeGeoCameraCapabilities(const QGeoCameraCapabilities &cameraCaps, QObject *parent) + : QObject(parent), cameraCaps_(cameraCaps) +{ + +} + +QDeclarativeGeoCameraCapabilities::~QDeclarativeGeoCameraCapabilities() +{ + +} + +/*! + \qmlproperty qreal CameraCapabilities::minimumZoomLevel + + This read-only property holds the minimum available zoom level with this map type. +*/ +qreal QDeclarativeGeoCameraCapabilities::minimumZoomLevel() const +{ + return cameraCaps_.minimumZoomLevelAt256(); +} + +/*! + \qmlproperty qreal CameraCapabilities::maximumZoomLevel + + This read-only property holds the maximum available zoom level with this map type. +*/ +qreal QDeclarativeGeoCameraCapabilities::maximumZoomLevel() const +{ + return cameraCaps_.maximumZoomLevelAt256(); +} + +/*! + \qmlproperty qreal CameraCapabilities::minimumTilt + + This read-only property holds the minimum available tilt with this map type. +*/ +qreal QDeclarativeGeoCameraCapabilities::minimumTilt() const +{ + return cameraCaps_.minimumTilt(); +} + +/*! + \qmlproperty qreal CameraCapabilities::maximumTilt + + This read-only property holds the maximum available tilt with this map type. +*/ +qreal QDeclarativeGeoCameraCapabilities::maximumTilt() const +{ + return cameraCaps_.maximumTilt(); +} + +/*! + \qmlproperty qreal CameraCapabilities::minimumFieldOfView + + This read-only property holds the minimum available field of view with this map type. +*/ +qreal QDeclarativeGeoCameraCapabilities::minimumFieldOfView() const +{ + return cameraCaps_.minimumFieldOfView(); +} + +/*! + \qmlproperty qreal CameraCapabilities::maximumFieldOfView + + This read-only property holds the maximum available field of view with this map type. +*/ +qreal QDeclarativeGeoCameraCapabilities::maximumFieldOfView() const +{ + return cameraCaps_.maximumFieldOfView(); +} + QT_END_NAMESPACE diff --git a/src/location/declarativemaps/qdeclarativegeomaptype_p.h b/src/location/declarativemaps/qdeclarativegeomaptype_p.h index 7b449aa0..5d99083d 100644 --- a/src/location/declarativemaps/qdeclarativegeomaptype_p.h +++ b/src/location/declarativemaps/qdeclarativegeomaptype_p.h @@ -56,6 +56,31 @@ QT_BEGIN_NAMESPACE +class Q_LOCATION_PRIVATE_EXPORT QDeclarativeGeoCameraCapabilities: public QObject +{ + Q_OBJECT + Q_PROPERTY(qreal minimumZoomLevel READ minimumZoomLevel CONSTANT) + Q_PROPERTY(qreal maximumZoomLevel READ maximumZoomLevel CONSTANT) + Q_PROPERTY(qreal minimumTilt READ minimumTilt CONSTANT) + Q_PROPERTY(qreal maximumTilt READ maximumTilt CONSTANT) + Q_PROPERTY(qreal minimumFieldOfView READ minimumFieldOfView CONSTANT) + Q_PROPERTY(qreal maximumFieldOfView READ maximumFieldOfView CONSTANT) + +public: + QDeclarativeGeoCameraCapabilities(const QGeoCameraCapabilities &cameraCaps, QObject *parent = 0); + ~QDeclarativeGeoCameraCapabilities(); + + qreal minimumZoomLevel() const; + qreal maximumZoomLevel() const; + qreal minimumTilt() const; + qreal maximumTilt() const; + qreal minimumFieldOfView() const; + qreal maximumFieldOfView() const; + +private: + QGeoCameraCapabilities cameraCaps_; +}; + class Q_LOCATION_PRIVATE_EXPORT QDeclarativeGeoMapType : public QObject { Q_OBJECT @@ -66,6 +91,8 @@ class Q_LOCATION_PRIVATE_EXPORT QDeclarativeGeoMapType : public QObject Q_PROPERTY(QString description READ description CONSTANT) Q_PROPERTY(bool mobile READ mobile CONSTANT) Q_PROPERTY(bool night READ night CONSTANT REVISION 1) + Q_PROPERTY(QDeclarativeGeoCameraCapabilities *cameraCapabilities READ cameraCapabilities CONSTANT) + Q_PROPERTY(QVariantMap metadata READ metadata CONSTANT) public: enum MapStyle { @@ -91,11 +118,14 @@ public: QString description() const; bool mobile() const; bool night() const; + QDeclarativeGeoCameraCapabilities *cameraCapabilities() const; + QVariantMap metadata() const; const QGeoMapType mapType() { return mapType_; } private: QGeoMapType mapType_; + QDeclarativeGeoCameraCapabilities *cameraCapabilities_; }; QT_END_NAMESPACE diff --git a/src/location/maps/qgeomappingmanagerengine.cpp b/src/location/maps/qgeomappingmanagerengine.cpp index ffc0f065..187b30eb 100644 --- a/src/location/maps/qgeomappingmanagerengine.cpp +++ b/src/location/maps/qgeomappingmanagerengine.cpp @@ -154,7 +154,13 @@ QGeoCameraCapabilities QGeoMappingManagerEngine::cameraCapabilities(int mapId) c { Q_UNUSED(mapId) Q_D(const QGeoMappingManagerEngine); - return d->capabilities_; + + if (mapId == 0) + return d->capabilities_; + int idx = mapId - 1; + if (idx >= supportedMapTypes().size()) + return d->capabilities_; + return supportedMapTypes().at(idx).cameraCapabilities(); } void QGeoMappingManagerEngine::setCameraCapabilities(const QGeoCameraCapabilities &capabilities) diff --git a/src/location/maps/qgeomappingmanagerengine_p.h b/src/location/maps/qgeomappingmanagerengine_p.h index 0f347d73..dd4aa681 100644 --- a/src/location/maps/qgeomappingmanagerengine_p.h +++ b/src/location/maps/qgeomappingmanagerengine_p.h @@ -90,7 +90,7 @@ public: QList supportedMapTypes() const; // the class is private, so this can be virtual here for now. - virtual QGeoCameraCapabilities cameraCapabilities(int mapId = 0) const; + QGeoCameraCapabilities cameraCapabilities(int mapId = 0) const; void setLocale(const QLocale &locale); QLocale locale() const; diff --git a/src/location/maps/qgeomaptype.cpp b/src/location/maps/qgeomaptype.cpp index 34781451..c4635998 100644 --- a/src/location/maps/qgeomaptype.cpp +++ b/src/location/maps/qgeomaptype.cpp @@ -46,8 +46,11 @@ QGeoMapType::QGeoMapType(const QGeoMapType &other) : d_ptr(other.d_ptr) {} QGeoMapType::QGeoMapType(QGeoMapType::MapStyle style, const QString &name, - const QString &description, bool mobile, bool night, int mapId, QByteArray pluginName) -: d_ptr(new QGeoMapTypePrivate(style, name, description, mobile, night, mapId, pluginName)) + const QString &description, bool mobile, bool night, int mapId, + const QByteArray &pluginName, + const QGeoCameraCapabilities &cameraCapabilities, + const QVariantMap &metadata) +: d_ptr(new QGeoMapTypePrivate(style, name, description, mobile, night, mapId, pluginName, cameraCapabilities, metadata)) { } @@ -107,6 +110,16 @@ QByteArray QGeoMapType::pluginName() const return d_ptr->pluginName_; } +QGeoCameraCapabilities QGeoMapType::cameraCapabilities() const +{ + return d_ptr->cameraCapabilities_; +} + +QVariantMap QGeoMapType::metadata() const +{ + return d_ptr->metadata_; +} + QGeoMapTypePrivate::QGeoMapTypePrivate() : style_(QGeoMapType::NoMap), mobile_(false), night_(false), mapId_(0) { @@ -114,15 +127,18 @@ QGeoMapTypePrivate::QGeoMapTypePrivate() QGeoMapTypePrivate::QGeoMapTypePrivate(const QGeoMapTypePrivate &other) : QSharedData(other), style_(other.style_), name_(other.name_), description_(other.description_), - mobile_(other.mobile_), night_(other.night_), mapId_(other.mapId_), pluginName_(other.pluginName_) + mobile_(other.mobile_), night_(other.night_), mapId_(other.mapId_), pluginName_(other.pluginName_), + cameraCapabilities_(other.cameraCapabilities_), metadata_(other.metadata_) { } QGeoMapTypePrivate::QGeoMapTypePrivate(QGeoMapType::MapStyle style, const QString &name, const QString &description, bool mobile, bool night, - int mapId, QByteArray pluginName) + int mapId, const QByteArray &pluginName, + const QGeoCameraCapabilities &cameraCapabilities, + const QVariantMap &metadata) : style_(style), name_(name), description_(description), mobile_(mobile), night_(night), - mapId_(mapId), pluginName_(pluginName) + mapId_(mapId), pluginName_(pluginName), cameraCapabilities_(cameraCapabilities), metadata_(metadata) { } @@ -134,7 +150,8 @@ bool QGeoMapTypePrivate::operator==(const QGeoMapTypePrivate &other) const { return pluginName_ == other.pluginName_ && style_ == other.style_ && name_ == other.name_ && description_ == other.description_ && mobile_ == other.mobile_ && night_ == other.night_ && - mapId_ == other.mapId_; + mapId_ == other.mapId_ && cameraCapabilities_ == other.cameraCapabilities_ && + metadata_ == other.metadata_; } QT_END_NAMESPACE diff --git a/src/location/maps/qgeomaptype_p.h b/src/location/maps/qgeomaptype_p.h index 4b5cb0d0..3ce0e95a 100644 --- a/src/location/maps/qgeomaptype_p.h +++ b/src/location/maps/qgeomaptype_p.h @@ -51,6 +51,8 @@ #include #include #include +#include +#include QT_BEGIN_NAMESPACE @@ -59,7 +61,7 @@ class QGeoMapTypePrivate; class Q_LOCATION_PRIVATE_EXPORT QGeoMapType { public: - enum MapStyle { + enum MapStyle { // ### Qt6: change this to be a QFlags instead, or remove. NoMap = 0, StreetMap, SatelliteMapDay, @@ -77,7 +79,9 @@ public: QGeoMapType(); QGeoMapType(const QGeoMapType &other); QGeoMapType(MapStyle style, const QString &name, const QString &description, bool mobile, - bool night, int mapId, QByteArray pluginName); + bool night, int mapId, const QByteArray &pluginName, + const QGeoCameraCapabilities &cameraCapabilities, + const QVariantMap &metadata = QVariantMap()); ~QGeoMapType(); QGeoMapType &operator = (const QGeoMapType &other); @@ -92,6 +96,8 @@ public: bool night() const; int mapId() const; QByteArray pluginName() const; + QGeoCameraCapabilities cameraCapabilities() const; + QVariantMap metadata() const; private: QSharedDataPointer d_ptr; diff --git a/src/location/maps/qgeomaptype_p_p.h b/src/location/maps/qgeomaptype_p_p.h index 039c0962..e66991ab 100644 --- a/src/location/maps/qgeomaptype_p_p.h +++ b/src/location/maps/qgeomaptype_p_p.h @@ -50,9 +50,10 @@ #include #include +#include #include #include - +#include "qgeocameracapabilities_p.h" #include "qgeomaptype_p.h" QT_BEGIN_NAMESPACE @@ -62,7 +63,9 @@ class QGeoMapTypePrivate : public QSharedData public: QGeoMapTypePrivate(); QGeoMapTypePrivate(QGeoMapType::MapStyle style, const QString &name, const QString &description, bool mobile, - bool night, int mapId, QByteArray pluginName); + bool night, int mapId, const QByteArray &pluginName, + const QGeoCameraCapabilities &cameraCapabilities, + const QVariantMap &metadata); QGeoMapTypePrivate(const QGeoMapTypePrivate &other); ~QGeoMapTypePrivate(); @@ -77,6 +80,8 @@ public: bool night_; int mapId_; QByteArray pluginName_; + QGeoCameraCapabilities cameraCapabilities_; + QVariantMap metadata_; }; QT_END_NAMESPACE diff --git a/src/plugins/geoservices/esri/geomapsource.cpp b/src/plugins/geoservices/esri/geomapsource.cpp index 19f284e6..7ec63e2f 100644 --- a/src/plugins/geoservices/esri/geomapsource.cpp +++ b/src/plugins/geoservices/esri/geomapsource.cpp @@ -67,8 +67,8 @@ static const MapStyleData mapStyles[] = GeoMapSource::GeoMapSource(QGeoMapType::MapStyle style, const QString &name, const QString &description, bool mobile, bool night, int mapId, - const QString &url, const QString ©right) : - QGeoMapType(style, name, description, mobile, night, mapId, "esri"), + const QString &url, const QString ©right, const QGeoCameraCapabilities &cameraCapabilities) : + QGeoMapType(style, name, description, mobile, night, mapId, "esri", cameraCapabilities), m_url(url), m_copyright(copyright) { } diff --git a/src/plugins/geoservices/esri/geomapsource.h b/src/plugins/geoservices/esri/geomapsource.h index 8660e999..86258d2e 100644 --- a/src/plugins/geoservices/esri/geomapsource.h +++ b/src/plugins/geoservices/esri/geomapsource.h @@ -41,6 +41,7 @@ #define GEOMAPSOURCE_H #include +#include QT_BEGIN_NAMESPACE @@ -49,7 +50,7 @@ class GeoMapSource : public QGeoMapType public: GeoMapSource(QGeoMapType::MapStyle style, const QString &name, const QString &description, bool mobile, bool night, int mapId, - const QString &url, const QString ©right); + const QString &url, const QString ©right, const QGeoCameraCapabilities &cameraCapabilities); inline const QString &url() const; inline const QString ©right() const; diff --git a/src/plugins/geoservices/esri/geotiledmappingmanagerengine_esri.cpp b/src/plugins/geoservices/esri/geotiledmappingmanagerengine_esri.cpp index 23783d7e..ac8f8450 100644 --- a/src/plugins/geoservices/esri/geotiledmappingmanagerengine_esri.cpp +++ b/src/plugins/geoservices/esri/geotiledmappingmanagerengine_esri.cpp @@ -106,7 +106,7 @@ GeoTiledMappingManagerEngineEsri::GeoTiledMappingManagerEngineEsri(const QVarian setTileSize(QSize(256, 256)); - if (!initializeMapSources(error, errorString)) + if (!initializeMapSources(error, errorString, cameraCaps)) return; QList mapTypes; @@ -119,7 +119,8 @@ GeoTiledMappingManagerEngineEsri::GeoTiledMappingManagerEngineEsri(const QVarian mapSource->mobile(), mapSource->night(), mapSource->mapId(), - "esri"); + "esri", + cameraCaps); } setSupportedMapTypes(mapTypes); @@ -237,7 +238,8 @@ QGeoMap *GeoTiledMappingManagerEngineEsri::createMap() // template = 'http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/{{z}}/{{y}}/{{x}}.png' bool GeoTiledMappingManagerEngineEsri::initializeMapSources(QGeoServiceProvider::Error *error, - QString *errorString) + QString *errorString, + const QGeoCameraCapabilities &cameraCaps) { initResources(); QFile mapsFile(":/esri/maps.json"); @@ -271,9 +273,7 @@ bool GeoTiledMappingManagerEngineEsri::initializeMapSources(QGeoServiceProvider: foreach (QVariant mapSourceElement, mapSources) { QVariantMap mapSource = mapSourceElement.toMap(); - int mapId = mapSource[kPropMapId].toInt(); - if (mapId <= 0) - mapId = m_mapSources.count() + 1; + int mapId = m_mapSources.count() + 1; m_mapSources << new GeoMapSource( GeoMapSource::mapStyle(mapSource[kPropStyle].toString()), @@ -283,7 +283,8 @@ bool GeoTiledMappingManagerEngineEsri::initializeMapSources(QGeoServiceProvider: mapSource[kPropMapId].toBool(), mapId, GeoMapSource::toFormat(mapSource[kPropUrl].toString()), - mapSource[kPropCopyright].toString() + mapSource[kPropCopyright].toString(), + cameraCaps ); } diff --git a/src/plugins/geoservices/esri/geotiledmappingmanagerengine_esri.h b/src/plugins/geoservices/esri/geotiledmappingmanagerengine_esri.h index a13ba05c..ea0c3c8b 100644 --- a/src/plugins/geoservices/esri/geotiledmappingmanagerengine_esri.h +++ b/src/plugins/geoservices/esri/geotiledmappingmanagerengine_esri.h @@ -63,7 +63,7 @@ public: GeoMapSource *mapSource(int mapId) const; private: - bool initializeMapSources(QGeoServiceProvider::Error *error, QString *errorString); + bool initializeMapSources(QGeoServiceProvider::Error *error, QString *errorString, const QGeoCameraCapabilities &cameraCaps); QList m_mapSources; }; diff --git a/src/plugins/geoservices/itemsoverlay/qgeomappingmanagerengineitemsoverlay.cpp b/src/plugins/geoservices/itemsoverlay/qgeomappingmanagerengineitemsoverlay.cpp index 955fbcae..c19815e8 100644 --- a/src/plugins/geoservices/itemsoverlay/qgeomappingmanagerengineitemsoverlay.cpp +++ b/src/plugins/geoservices/itemsoverlay/qgeomappingmanagerengineitemsoverlay.cpp @@ -62,7 +62,7 @@ QGeoMappingManagerEngineItemsOverlay::QGeoMappingManagerEngineItemsOverlay(const setCameraCapabilities(cameraCaps); QList mapTypes; - mapTypes << QGeoMapType(QGeoMapType::NoMap, tr("Empty Map"), tr("Empty Map"), false, false, 1, "itemsoverlay"); + mapTypes << QGeoMapType(QGeoMapType::NoMap, tr("Empty Map"), tr("Empty Map"), false, false, 1, "itemsoverlay", cameraCaps); setSupportedMapTypes(mapTypes); engineInitialized(); diff --git a/src/plugins/geoservices/mapbox/qgeotiledmappingmanagerenginemapbox.cpp b/src/plugins/geoservices/mapbox/qgeotiledmappingmanagerenginemapbox.cpp index 03a574c3..632b2286 100644 --- a/src/plugins/geoservices/mapbox/qgeotiledmappingmanagerenginemapbox.cpp +++ b/src/plugins/geoservices/mapbox/qgeotiledmappingmanagerenginemapbox.cpp @@ -66,41 +66,41 @@ QGeoTiledMappingManagerEngineMapbox::QGeoTiledMappingManagerEngineMapbox(const Q // as index 0 to retain compatibility with the current API, that expects the passed map_id to be on by default. if (parameters.contains(QStringLiteral("mapbox.mapping.map_id"))) { const QString name = parameters.value(QStringLiteral("mapbox.mapping.map_id")).toString(); - mapTypes << QGeoMapType(QGeoMapType::CustomMap, name, name, false, false, mapTypes.size() + 1, pluginName); + mapTypes << QGeoMapType(QGeoMapType::CustomMap, name, name, false, false, mapTypes.size() + 1, pluginName, cameraCaps); } else if (parameters.contains(QStringLiteral("mapbox.map_id"))) { //deprecated const QString name = parameters.value(QStringLiteral("mapbox.map_id")).toString(); - mapTypes << QGeoMapType(QGeoMapType::CustomMap, name, name, false, false, mapTypes.size() + 1, pluginName); + mapTypes << QGeoMapType(QGeoMapType::CustomMap, name, name, false, false, mapTypes.size() + 1, pluginName, cameraCaps); } // As of 2016.06.15, valid mapbox map_ids are documented at https://www.mapbox.com/api-documentation/#maps //: Noun describing map type 'Street map' - mapTypes << QGeoMapType(QGeoMapType::StreetMap, QStringLiteral("mapbox.streets"), tr("Street"), false, false, mapTypes.size() + 1, pluginName); + mapTypes << QGeoMapType(QGeoMapType::StreetMap, QStringLiteral("mapbox.streets"), tr("Street"), false, false, mapTypes.size() + 1, pluginName, cameraCaps); //: Noun describing type of a map using light colors (weak contrast) - mapTypes << QGeoMapType(QGeoMapType::StreetMap, QStringLiteral("mapbox.light"), tr("Light"), false, false, mapTypes.size() + 1, pluginName); + mapTypes << QGeoMapType(QGeoMapType::StreetMap, QStringLiteral("mapbox.light"), tr("Light"), false, false, mapTypes.size() + 1, pluginName, cameraCaps); //: Noun describing type of a map using dark colors - mapTypes << QGeoMapType(QGeoMapType::StreetMap, QStringLiteral("mapbox.dark"), tr("Dark"), false, true, mapTypes.size() + 1, pluginName); + mapTypes << QGeoMapType(QGeoMapType::StreetMap, QStringLiteral("mapbox.dark"), tr("Dark"), false, true, mapTypes.size() + 1, pluginName, cameraCaps); //: Noun describing type of a map created by satellite - mapTypes << QGeoMapType(QGeoMapType::SatelliteMapDay, QStringLiteral("mapbox.satellite"), tr("Satellite"), false, false, mapTypes.size() + 1, pluginName); + mapTypes << QGeoMapType(QGeoMapType::SatelliteMapDay, QStringLiteral("mapbox.satellite"), tr("Satellite"), false, false, mapTypes.size() + 1, pluginName, cameraCaps); //: Noun describing type of a street map created by satellite - mapTypes << QGeoMapType(QGeoMapType::HybridMap, QStringLiteral("mapbox.streets-satellite"), tr("Streets Satellite"), false, false, mapTypes.size() + 1, pluginName); + mapTypes << QGeoMapType(QGeoMapType::HybridMap, QStringLiteral("mapbox.streets-satellite"), tr("Streets Satellite"), false, false, mapTypes.size() + 1, pluginName, cameraCaps); //: Noun describing type of a map using wheat paste colors - mapTypes << QGeoMapType(QGeoMapType::CustomMap, QStringLiteral("mapbox.wheatpaste"), tr("Wheatpaste"), false, false, mapTypes.size() + 1, pluginName); + mapTypes << QGeoMapType(QGeoMapType::CustomMap, QStringLiteral("mapbox.wheatpaste"), tr("Wheatpaste"), false, false, mapTypes.size() + 1, pluginName, cameraCaps); //: Noun describing type of a basic street map - mapTypes << QGeoMapType(QGeoMapType::StreetMap, QStringLiteral("mapbox.streets-basic"), tr("Streets Basic"), false, false, mapTypes.size() + 1, pluginName); + mapTypes << QGeoMapType(QGeoMapType::StreetMap, QStringLiteral("mapbox.streets-basic"), tr("Streets Basic"), false, false, mapTypes.size() + 1, pluginName, cameraCaps); //: Noun describing type of a map using cartoon-style fonts - mapTypes << QGeoMapType(QGeoMapType::CustomMap, QStringLiteral("mapbox.comic"), tr("Comic"), false, false, mapTypes.size() + 1, pluginName); + mapTypes << QGeoMapType(QGeoMapType::CustomMap, QStringLiteral("mapbox.comic"), tr("Comic"), false, false, mapTypes.size() + 1, pluginName, cameraCaps); //: Noun describing type of a map for outdoor activities - mapTypes << QGeoMapType(QGeoMapType::PedestrianMap, QStringLiteral("mapbox.outdoors"), tr("Outdoors"), false, false, mapTypes.size() + 1, pluginName); + mapTypes << QGeoMapType(QGeoMapType::PedestrianMap, QStringLiteral("mapbox.outdoors"), tr("Outdoors"), false, false, mapTypes.size() + 1, pluginName, cameraCaps); //: Noun describing type of a map for sports - mapTypes << QGeoMapType(QGeoMapType::CycleMap, QStringLiteral("mapbox.run-bike-hike"), tr("Run Bike Hike"), false, false, mapTypes.size() + 1, pluginName); + mapTypes << QGeoMapType(QGeoMapType::CycleMap, QStringLiteral("mapbox.run-bike-hike"), tr("Run Bike Hike"), false, false, mapTypes.size() + 1, pluginName, cameraCaps); //: Noun describing type of a map drawn by pencil - mapTypes << QGeoMapType(QGeoMapType::CustomMap, QStringLiteral("mapbox.pencil"), tr("Pencil"), false, false, mapTypes.size() + 1, pluginName); + mapTypes << QGeoMapType(QGeoMapType::CustomMap, QStringLiteral("mapbox.pencil"), tr("Pencil"), false, false, mapTypes.size() + 1, pluginName, cameraCaps); //: Noun describing type of a treasure map with pirate boat watermark - mapTypes << QGeoMapType(QGeoMapType::CustomMap, QStringLiteral("mapbox.pirates"), tr("Pirates"), false, false, mapTypes.size() + 1, pluginName); + mapTypes << QGeoMapType(QGeoMapType::CustomMap, QStringLiteral("mapbox.pirates"), tr("Pirates"), false, false, mapTypes.size() + 1, pluginName, cameraCaps); //: Noun describing type of a map using emerald colors - mapTypes << QGeoMapType(QGeoMapType::CustomMap, QStringLiteral("mapbox.emerald"), tr("Emerald"), false, false, mapTypes.size() + 1, pluginName); + mapTypes << QGeoMapType(QGeoMapType::CustomMap, QStringLiteral("mapbox.emerald"), tr("Emerald"), false, false, mapTypes.size() + 1, pluginName, cameraCaps); //: Noun describing type of a map with high contrast - mapTypes << QGeoMapType(QGeoMapType::CustomMap, QStringLiteral("mapbox.high-contrast"), tr("High Contrast"), false, false, mapTypes.size() + 1, pluginName); + mapTypes << QGeoMapType(QGeoMapType::CustomMap, QStringLiteral("mapbox.high-contrast"), tr("High Contrast"), false, false, mapTypes.size() + 1, pluginName, cameraCaps); // New way to specify multiple customized map_ids via additional_map_ids if (parameters.contains(QStringLiteral("mapbox.mapping.additional_map_ids"))) { @@ -109,7 +109,7 @@ QGeoTiledMappingManagerEngineMapbox::QGeoTiledMappingManagerEngineMapbox(const Q for (const QString &name: idList) { if (!name.isEmpty()) - mapTypes << QGeoMapType(QGeoMapType::CustomMap, name, name, false, false, mapTypes.size() + 1, pluginName); + mapTypes << QGeoMapType(QGeoMapType::CustomMap, name, name, false, false, mapTypes.size() + 1, pluginName, cameraCaps); } } diff --git a/src/plugins/geoservices/mapboxgl/qgeomappingmanagerenginemapboxgl.cpp b/src/plugins/geoservices/mapboxgl/qgeomappingmanagerenginemapboxgl.cpp index 211c0bba..9fa8f695 100644 --- a/src/plugins/geoservices/mapboxgl/qgeomappingmanagerenginemapboxgl.cpp +++ b/src/plugins/geoservices/mapboxgl/qgeomappingmanagerenginemapboxgl.cpp @@ -70,25 +70,25 @@ QGeoMappingManagerEngineMapboxGL::QGeoMappingManagerEngineMapboxGL(const QVarian const QByteArray pluginName = "mapboxgl"; mapTypes << QGeoMapType(QGeoMapType::StreetMap, QStringLiteral("mapbox://styles/mapbox/streets-v10"), - tr("Streets"), false, false, ++mapId, pluginName); + tr("Streets"), false, false, ++mapId, pluginName, cameraCaps); mapTypes << QGeoMapType(QGeoMapType::StreetMap, QStringLiteral("mapbox://styles/mapbox/basic-v9"), - tr("Basic"), false, false, ++mapId, pluginName); + tr("Basic"), false, false, ++mapId, pluginName, cameraCaps); mapTypes << QGeoMapType(QGeoMapType::StreetMap, QStringLiteral("mapbox://styles/mapbox/bright-v9"), - tr("Bright"), false, false, ++mapId, pluginName); + tr("Bright"), false, false, ++mapId, pluginName, cameraCaps); mapTypes << QGeoMapType(QGeoMapType::TerrainMap, QStringLiteral("mapbox://styles/mapbox/outdoors-v10"), - tr("Outdoors"), false, false, ++mapId, pluginName); + tr("Outdoors"), false, false, ++mapId, pluginName, cameraCaps); mapTypes << QGeoMapType(QGeoMapType::SatelliteMapDay, QStringLiteral("mapbox://styles/mapbox/satellite-v9"), - tr("Satellite"), false, false, ++mapId, pluginName); + tr("Satellite"), false, false, ++mapId, pluginName, cameraCaps); mapTypes << QGeoMapType(QGeoMapType::HybridMap, QStringLiteral("mapbox://styles/mapbox/satellite-streets-v10"), - tr("Satellite Streets"), false, false, ++mapId, pluginName); + tr("Satellite Streets"), false, false, ++mapId, pluginName, cameraCaps); mapTypes << QGeoMapType(QGeoMapType::GrayStreetMap, QStringLiteral("mapbox://styles/mapbox/light-v9"), - tr("Light"), false, false, ++mapId, pluginName); + tr("Light"), false, false, ++mapId, pluginName, cameraCaps); mapTypes << QGeoMapType(QGeoMapType::GrayStreetMap, QStringLiteral("mapbox://styles/mapbox/dark-v9"), - tr("Dark"), false, false, ++mapId, pluginName); + tr("Dark"), false, false, ++mapId, pluginName, cameraCaps); mapTypes << QGeoMapType(QGeoMapType::TransitMap, QStringLiteral("mapbox://styles/mapbox/traffic-day-v1"), - tr("Streets Traffic Day"), false, false, ++mapId, pluginName); + tr("Streets Traffic Day"), false, false, ++mapId, pluginName, cameraCaps); mapTypes << QGeoMapType(QGeoMapType::TransitMap, QStringLiteral("mapbox://styles/mapbox/traffic-night-v1"), - tr("Streets Traffic Night"), false, true, ++mapId, pluginName); + tr("Streets Traffic Night"), false, true, ++mapId, pluginName, cameraCaps); if (parameters.contains(QStringLiteral("mapboxgl.mapping.additional_style_urls"))) { const QString ids = parameters.value(QStringLiteral("mapboxgl.mapping.additional_style_urls")).toString(); @@ -99,7 +99,7 @@ QGeoMappingManagerEngineMapboxGL::QGeoMappingManagerEngineMapboxGL(const QVarian continue; mapTypes.prepend(QGeoMapType(QGeoMapType::CustomMap, *it, - tr("User provided style"), false, false, ++mapId, pluginName)); + tr("User provided style"), false, false, ++mapId, pluginName, cameraCaps)); } } diff --git a/src/plugins/geoservices/nokia/qgeotiledmappingmanagerengine_nokia.cpp b/src/plugins/geoservices/nokia/qgeotiledmappingmanagerengine_nokia.cpp index 146071f7..e315c44e 100644 --- a/src/plugins/geoservices/nokia/qgeotiledmappingmanagerengine_nokia.cpp +++ b/src/plugins/geoservices/nokia/qgeotiledmappingmanagerengine_nokia.cpp @@ -90,29 +90,30 @@ QGeoTiledMappingManagerEngineNokia::QGeoTiledMappingManagerEngineNokia( setTileSize(QSize(256, 256)); + int mapId = 0; const QByteArray pluginName = "here"; QList types; - types << QGeoMapType(QGeoMapType::StreetMap, tr("Street Map"), tr("Normal map view in daylight mode"), false, false, 1, pluginName); - types << QGeoMapType(QGeoMapType::SatelliteMapDay, tr("Satellite Map"), tr("Satellite map view in daylight mode"), false, false, 2, pluginName); - types << QGeoMapType(QGeoMapType::TerrainMap, tr("Terrain Map"), tr("Terrain map view in daylight mode"), false, false, 3, pluginName); - types << QGeoMapType(QGeoMapType::HybridMap, tr("Hybrid Map"), tr("Satellite map view with streets in daylight mode"), false, false, 4, pluginName); - types << QGeoMapType(QGeoMapType::TransitMap, tr("Transit Map"), tr("Color-reduced map view with public transport scheme in daylight mode"), false, false, 5, pluginName); - types << QGeoMapType(QGeoMapType::GrayStreetMap, tr("Gray Street Map"), tr("Color-reduced map view in daylight mode"), false, false, 6, pluginName); - types << QGeoMapType(QGeoMapType::StreetMap, tr("Mobile Street Map"), tr("Mobile normal map view in daylight mode"), true, false, 7, pluginName); - types << QGeoMapType(QGeoMapType::TerrainMap, tr("Mobile Terrain Map"), tr("Mobile terrain map view in daylight mode"), true, false, 8, pluginName); - types << QGeoMapType(QGeoMapType::HybridMap, tr("Mobile Hybrid Map"), tr("Mobile satellite map view with streets in daylight mode"), true, false, 9, pluginName); - types << QGeoMapType(QGeoMapType::TransitMap, tr("Mobile Transit Map"), tr("Mobile color-reduced map view with public transport scheme in daylight mode"), true, false, 10, pluginName); - types << QGeoMapType(QGeoMapType::GrayStreetMap, tr("Mobile Gray Street Map"), tr("Mobile color-reduced map view in daylight mode"), true, false, 11, pluginName); - types << QGeoMapType(QGeoMapType::StreetMap, tr("Custom Street Map"), tr("Normal map view in daylight mode"), false, false, 12, pluginName); - types << QGeoMapType(QGeoMapType::StreetMap, tr("Night Street Map"), tr("Normal map view in night mode"), false, true, 13, pluginName); - types << QGeoMapType(QGeoMapType::StreetMap, tr("Mobile Night Street Map"), tr("Mobile normal map view in night mode"), true, true, 14, pluginName); - types << QGeoMapType(QGeoMapType::GrayStreetMap, tr("Gray Night Street Map"), tr("Color-reduced map view in night mode (especially used for background maps)"), false, true, 15, pluginName); - types << QGeoMapType(QGeoMapType::GrayStreetMap, tr("Mobile Gray Night Street Map"), tr("Mobile color-reduced map view in night mode (especially used for background maps)"), true, true, 16, pluginName); - types << QGeoMapType(QGeoMapType::PedestrianMap, tr("Pedestrian Street Map"), tr("Pedestrian map view in daylight mode"), false, false, 17, pluginName); - types << QGeoMapType(QGeoMapType::PedestrianMap, tr("Mobile Pedestrian Street Map"), tr("Mobile pedestrian map view in daylight mode for mobile usage"), true, false, 18, pluginName); - types << QGeoMapType(QGeoMapType::PedestrianMap, tr("Pedestrian Night Street Map"), tr("Pedestrian map view in night mode"), false, true, 19, pluginName); - types << QGeoMapType(QGeoMapType::PedestrianMap, tr("Mobile Pedestrian Night Street Map"), tr("Mobile pedestrian map view in night mode for mobile usage"), true, true, 20, pluginName); - types << QGeoMapType(QGeoMapType::CarNavigationMap, tr("Car Navigation Map"), tr("Normal map view in daylight mode for car navigation"), false, false, 21, pluginName); + types << QGeoMapType(QGeoMapType::StreetMap, tr("Street Map"), tr("Normal map view in daylight mode"), false, false, ++mapId, pluginName, capabilities); + types << QGeoMapType(QGeoMapType::SatelliteMapDay, tr("Satellite Map"), tr("Satellite map view in daylight mode"), false, false, ++mapId, pluginName, capabilities); + types << QGeoMapType(QGeoMapType::TerrainMap, tr("Terrain Map"), tr("Terrain map view in daylight mode"), false, false, ++mapId, pluginName, capabilities); + types << QGeoMapType(QGeoMapType::HybridMap, tr("Hybrid Map"), tr("Satellite map view with streets in daylight mode"), false, false, ++mapId, pluginName, capabilities); + types << QGeoMapType(QGeoMapType::TransitMap, tr("Transit Map"), tr("Color-reduced map view with public transport scheme in daylight mode"), false, false, ++mapId, pluginName, capabilities); + types << QGeoMapType(QGeoMapType::GrayStreetMap, tr("Gray Street Map"), tr("Color-reduced map view in daylight mode"), false, false, ++mapId, pluginName, capabilities); + types << QGeoMapType(QGeoMapType::StreetMap, tr("Mobile Street Map"), tr("Mobile normal map view in daylight mode"), true, false, ++mapId, pluginName, capabilities); + types << QGeoMapType(QGeoMapType::TerrainMap, tr("Mobile Terrain Map"), tr("Mobile terrain map view in daylight mode"), true, false, ++mapId, pluginName, capabilities); + types << QGeoMapType(QGeoMapType::HybridMap, tr("Mobile Hybrid Map"), tr("Mobile satellite map view with streets in daylight mode"), true, false, ++mapId, pluginName, capabilities); + types << QGeoMapType(QGeoMapType::TransitMap, tr("Mobile Transit Map"), tr("Mobile color-reduced map view with public transport scheme in daylight mode"), true, false, ++mapId, pluginName, capabilities); + types << QGeoMapType(QGeoMapType::GrayStreetMap, tr("Mobile Gray Street Map"), tr("Mobile color-reduced map view in daylight mode"), true, false, ++mapId, pluginName, capabilities); + types << QGeoMapType(QGeoMapType::StreetMap, tr("Custom Street Map"), tr("Normal map view in daylight mode"), false, false, ++mapId, pluginName, capabilities); + types << QGeoMapType(QGeoMapType::StreetMap, tr("Night Street Map"), tr("Normal map view in night mode"), false, true, ++mapId, pluginName, capabilities); + types << QGeoMapType(QGeoMapType::StreetMap, tr("Mobile Night Street Map"), tr("Mobile normal map view in night mode"), true, true, ++mapId, pluginName, capabilities); + types << QGeoMapType(QGeoMapType::GrayStreetMap, tr("Gray Night Street Map"), tr("Color-reduced map view in night mode (especially used for background maps)"), false, true, ++mapId, pluginName, capabilities); + types << QGeoMapType(QGeoMapType::GrayStreetMap, tr("Mobile Gray Night Street Map"), tr("Mobile color-reduced map view in night mode (especially used for background maps)"), true, true, ++mapId, pluginName, capabilities); + types << QGeoMapType(QGeoMapType::PedestrianMap, tr("Pedestrian Street Map"), tr("Pedestrian map view in daylight mode"), false, false, ++mapId, pluginName, capabilities); + types << QGeoMapType(QGeoMapType::PedestrianMap, tr("Mobile Pedestrian Street Map"), tr("Mobile pedestrian map view in daylight mode for mobile usage"), true, false, ++mapId, pluginName, capabilities); + types << QGeoMapType(QGeoMapType::PedestrianMap, tr("Pedestrian Night Street Map"), tr("Pedestrian map view in night mode"), false, true, ++mapId, pluginName, capabilities); + types << QGeoMapType(QGeoMapType::PedestrianMap, tr("Mobile Pedestrian Night Street Map"), tr("Mobile pedestrian map view in night mode for mobile usage"), true, true, ++mapId, pluginName, capabilities); + types << QGeoMapType(QGeoMapType::CarNavigationMap, tr("Car Navigation Map"), tr("Normal map view in daylight mode for car navigation"), false, false, ++mapId, pluginName, capabilities); setSupportedMapTypes(types); QGeoTileFetcherNokia *fetcher = new QGeoTileFetcherNokia(parameters, networkManager, this, tileSize(), ppi); diff --git a/src/plugins/geoservices/osm/qgeotiledmappingmanagerengineosm.cpp b/src/plugins/geoservices/osm/qgeotiledmappingmanagerengineosm.cpp index da7b61d2..3f0062c0 100644 --- a/src/plugins/geoservices/osm/qgeotiledmappingmanagerengineosm.cpp +++ b/src/plugins/geoservices/osm/qgeotiledmappingmanagerengineosm.cpp @@ -164,25 +164,25 @@ QGeoTiledMappingManagerEngineOsm::QGeoTiledMappingManagerEngineOsm(const QVarian /* QGeoTileProviderOsms setup */ const QByteArray pluginName = "osm"; m_providers.push_back( new QGeoTileProviderOsm( nm, - QGeoMapType(QGeoMapType::StreetMap, tr("Street Map"), tr("Street map view in daylight mode"), false, false, 1, pluginName), + QGeoMapType(QGeoMapType::StreetMap, tr("Street Map"), tr("Street map view in daylight mode"), false, false, 1, pluginName, cameraCaps), providers_street, cameraCaps )); m_providers.push_back( new QGeoTileProviderOsm( nm, - QGeoMapType(QGeoMapType::SatelliteMapDay, tr("Satellite Map"), tr("Satellite map view in daylight mode"), false, false, 2, pluginName), + QGeoMapType(QGeoMapType::SatelliteMapDay, tr("Satellite Map"), tr("Satellite map view in daylight mode"), false, false, 2, pluginName, cameraCaps), providers_satellite, cameraCaps )); m_providers.push_back( new QGeoTileProviderOsm( nm, - QGeoMapType(QGeoMapType::CycleMap, tr("Cycle Map"), tr("Cycle map view in daylight mode"), false, false, 3, pluginName), + QGeoMapType(QGeoMapType::CycleMap, tr("Cycle Map"), tr("Cycle map view in daylight mode"), false, false, 3, pluginName, cameraCaps), providers_cycle, cameraCaps )); m_providers.push_back( new QGeoTileProviderOsm( nm, - QGeoMapType(QGeoMapType::TransitMap, tr("Transit Map"), tr("Public transit map view in daylight mode"), false, false, 4, pluginName), + QGeoMapType(QGeoMapType::TransitMap, tr("Transit Map"), tr("Public transit map view in daylight mode"), false, false, 4, pluginName, cameraCaps), providers_transit, cameraCaps )); m_providers.push_back( new QGeoTileProviderOsm( nm, - QGeoMapType(QGeoMapType::TransitMap, tr("Night Transit Map"), tr("Public transit map view in night mode"), false, true, 5, pluginName), + QGeoMapType(QGeoMapType::TransitMap, tr("Night Transit Map"), tr("Public transit map view in night mode"), false, true, 5, pluginName, cameraCaps), providers_nighttransit, cameraCaps )); m_providers.push_back( new QGeoTileProviderOsm( nm, - QGeoMapType(QGeoMapType::TerrainMap, tr("Terrain Map"), tr("Terrain map view"), false, false, 6, pluginName), + QGeoMapType(QGeoMapType::TerrainMap, tr("Terrain Map"), tr("Terrain map view"), false, false, 6, pluginName, cameraCaps), providers_terrain, cameraCaps )); m_providers.push_back( new QGeoTileProviderOsm( nm, - QGeoMapType(QGeoMapType::PedestrianMap, tr("Hiking Map"), tr("Hiking map view"), false, false, 7, pluginName), + QGeoMapType(QGeoMapType::PedestrianMap, tr("Hiking Map"), tr("Hiking map view"), false, false, 7, pluginName, cameraCaps), providers_hiking, cameraCaps )); if (parameters.contains(QStringLiteral("osm.mapping.custom.host")) @@ -206,7 +206,7 @@ QGeoTiledMappingManagerEngineOsm::QGeoTiledMappingManagerEngineOsm(const QVarian m_providers.push_back( new QGeoTileProviderOsm( nm, - QGeoMapType(QGeoMapType::CustomMap, tr("Custom URL Map"), tr("Custom url map view set via urlprefix parameter"), false, false, 8, pluginName), + QGeoMapType(QGeoMapType::CustomMap, tr("Custom URL Map"), tr("Custom url map view set via urlprefix parameter"), false, false, 8, pluginName, cameraCaps), { new TileProvider(tmsServer + QStringLiteral("%z/%x/%y.png"), QStringLiteral("png"), mapCopyright, @@ -351,16 +351,6 @@ QString QGeoTiledMappingManagerEngineOsm::customCopyright() const return m_customCopyright; } -QGeoCameraCapabilities QGeoTiledMappingManagerEngineOsm::cameraCapabilities(int mapId) const -{ - if (mapId == 0) - return QGeoMappingManagerEngine::cameraCapabilities(mapId); - int idx = mapId - 1; - if (idx >= m_providers.size()) - return QGeoMappingManagerEngine::cameraCapabilities(mapId); - return m_providers[idx]->cameraCapabilities(); -} - void QGeoTiledMappingManagerEngineOsm::onProviderResolutionFinished(const QGeoTileProviderOsm *provider) { if (!provider->isResolved()) diff --git a/src/plugins/geoservices/osm/qgeotiledmappingmanagerengineosm.h b/src/plugins/geoservices/osm/qgeotiledmappingmanagerengineosm.h index c5f16c2b..12290c8f 100644 --- a/src/plugins/geoservices/osm/qgeotiledmappingmanagerengineosm.h +++ b/src/plugins/geoservices/osm/qgeotiledmappingmanagerengineosm.h @@ -62,7 +62,6 @@ public: QGeoMap *createMap() override; const QVector &providers(); QString customCopyright() const; - QGeoCameraCapabilities cameraCapabilities(int mapId) const override; protected Q_SLOTS: void onProviderResolutionFinished(const QGeoTileProviderOsm *provider); diff --git a/src/plugins/geoservices/osm/qgeotileproviderosm.cpp b/src/plugins/geoservices/osm/qgeotileproviderosm.cpp index ad8edfd5..e736f6b7 100644 --- a/src/plugins/geoservices/osm/qgeotileproviderosm.cpp +++ b/src/plugins/geoservices/osm/qgeotileproviderosm.cpp @@ -234,7 +234,8 @@ void QGeoTileProviderOsm::updateCameraCapabilities() m_cameraCapabilities.setMinimumZoomLevel(minimumZoomLevel()); m_cameraCapabilities.setMaximumZoomLevel(maximumZoomLevel()); - // Pushing the change + m_mapType = QGeoMapType(m_mapType.style(), m_mapType.name(), m_mapType.description(), m_mapType.mobile(), + m_mapType.night(), m_mapType.mapId(), m_mapType.pluginName(), m_cameraCapabilities); } void QGeoTileProviderOsm::addProvider(TileProvider *provider) diff --git a/tests/auto/declarative_ui/tst_map.qml b/tests/auto/declarative_ui/tst_map.qml index 846a621f..cd79952c 100644 --- a/tests/auto/declarative_ui/tst_map.qml +++ b/tests/auto/declarative_ui/tst_map.qml @@ -29,7 +29,7 @@ import QtQuick 2.0 import QtTest 1.0 import QtPositioning 5.5 -import QtLocation 5.9 +import QtLocation 5.10 Item { width:100 @@ -237,6 +237,8 @@ Item { //initial plugin values compare(map.minimumZoomLevel, 0) compare(map.maximumZoomLevel, 20) + compare(map.activeMapType.cameraCapabilities.minimumZoomLevel, 0) + compare(map.activeMapType.cameraCapabilities.maximumZoomLevel, 20) //Higher min level than curr zoom, should change curr zoom map.minimumZoomLevel = 5 @@ -260,6 +262,8 @@ Item { map.zoomLevel = 18 map.maximumZoomLevel = 16 compare(map.zoomLevel, 16) + compare(map.activeMapType.cameraCapabilities.minimumZoomLevel, 0) + compare(map.activeMapType.cameraCapabilities.maximumZoomLevel, 20) //reseting default map.minimumZoomLevel = 0 @@ -275,6 +279,8 @@ Item { //initial plugin values compare(map.minimumTilt, 0) compare(map.maximumTilt, 60) + compare(map.activeMapType.cameraCapabilities.minimumTilt, 0) + compare(map.activeMapType.cameraCapabilities.maximumTilt, 60) //Higher min level than curr tilt, should change curr tilt map.minimumTilt = 5 @@ -282,6 +288,9 @@ Item { compare(map.tilt, 5) compare(map.minimumTilt, 5) compare(map.maximumTilt, 18) + // Capabilities remain the same + compare(map.activeMapType.cameraCapabilities.minimumTilt, 0) + compare(map.activeMapType.cameraCapabilities.maximumTilt, 60) //Trying to set higher than max, max should be set. map.maximumTilt = 61 @@ -315,6 +324,8 @@ Item { //initial plugin values compare(map.minimumFieldOfView, 45) compare(map.maximumFieldOfView, 45) + compare(map.activeMapType.cameraCapabilities.minimumFieldOfView, 45) + compare(map.activeMapType.cameraCapabilities.maximumFieldOfView, 45) map.minimumFieldOfView = 5 map.maximumFieldOfView = 18 @@ -327,6 +338,8 @@ Item { // camera caps are [1-179], user previously asked for [5-18] compare(map.minimumFieldOfView, 5) compare(map.maximumFieldOfView, 18) + compare(map.activeMapType.cameraCapabilities.minimumFieldOfView, 1) + compare(map.activeMapType.cameraCapabilities.maximumFieldOfView, 179) map.fieldOfView = 4 compare(map.fieldOfView, 5) @@ -365,6 +378,8 @@ Item { compare(map.minimumFieldOfView, 45) compare(map.maximumFieldOfView, 45) compare(map.fieldOfView, 45) + compare(map.activeMapType.cameraCapabilities.minimumFieldOfView, 45) + compare(map.activeMapType.cameraCapabilities.maximumFieldOfView, 45) } function test_zoom() diff --git a/tests/auto/declarative_ui/tst_map_maptype.qml b/tests/auto/declarative_ui/tst_map_maptype.qml index 1de30439..f4564ea6 100644 --- a/tests/auto/declarative_ui/tst_map_maptype.qml +++ b/tests/auto/declarative_ui/tst_map_maptype.qml @@ -28,7 +28,7 @@ import QtQuick 2.0 import QtTest 1.0 -import QtLocation 5.6 +import QtLocation 5.10 Item{ id: page @@ -122,6 +122,13 @@ Item{ compare(map.minimumFieldOfView, 45) compare(map.maximumFieldOfView, 45) + compare(map.activeMapType.cameraCapabilities.minimumZoomLevel, 0) + compare(map.activeMapType.cameraCapabilities.maximumZoomLevel, 20) + compare(map.activeMapType.cameraCapabilities.minimumTilt, 0) + compare(map.activeMapType.cameraCapabilities.maximumTilt, 60) + compare(map.activeMapType.cameraCapabilities.minimumFieldOfView, 45) + compare(map.activeMapType.cameraCapabilities.maximumFieldOfView, 45) + tryCompare(minimumZoomLevelChangedSpy, "count", 0) tryCompare(maximumZoomLevelChangedSpy, "count", 0) tryCompare(minimumTiltChangedSpy, "count", 0) @@ -139,6 +146,13 @@ Item{ compare(map.minimumFieldOfView, 45) compare(map.maximumFieldOfView, 45) + compare(map.activeMapType.cameraCapabilities.minimumZoomLevel, 0) + compare(map.activeMapType.cameraCapabilities.maximumZoomLevel, 20) + compare(map.activeMapType.cameraCapabilities.minimumTilt, 0) + compare(map.activeMapType.cameraCapabilities.maximumTilt, 60) + compare(map.activeMapType.cameraCapabilities.minimumFieldOfView, 45) + compare(map.activeMapType.cameraCapabilities.maximumFieldOfView, 45) + tryCompare(minimumZoomLevelChangedSpy, "count", 0) tryCompare(maximumZoomLevelChangedSpy, "count", 0) tryCompare(minimumTiltChangedSpy, "count", 0) @@ -156,6 +170,13 @@ Item{ compare(map.minimumFieldOfView, 1) compare(map.maximumFieldOfView, 179) + compare(map.activeMapType.cameraCapabilities.minimumZoomLevel, 0) + compare(map.activeMapType.cameraCapabilities.maximumZoomLevel, 19) + compare(map.activeMapType.cameraCapabilities.minimumTilt, 0) + compare(map.activeMapType.cameraCapabilities.maximumTilt, 80) + compare(map.activeMapType.cameraCapabilities.minimumFieldOfView, 1) + compare(map.activeMapType.cameraCapabilities.maximumFieldOfView, 179) + tryCompare(minimumZoomLevelChangedSpy, "count", 0) tryCompare(maximumZoomLevelChangedSpy, "count", 1) tryCompare(minimumTiltChangedSpy, "count", 0) @@ -173,13 +194,29 @@ Item{ compare(map.minimumFieldOfView, 45) compare(map.maximumFieldOfView, 45) + compare(map.activeMapType.cameraCapabilities.minimumZoomLevel, 0) + compare(map.activeMapType.cameraCapabilities.maximumZoomLevel, 20) + compare(map.activeMapType.cameraCapabilities.minimumTilt, 0) + compare(map.activeMapType.cameraCapabilities.maximumTilt, 60) + compare(map.activeMapType.cameraCapabilities.minimumFieldOfView, 45) + compare(map.activeMapType.cameraCapabilities.maximumFieldOfView, 45) + tryCompare(minimumZoomLevelChangedSpy, "count", 0) tryCompare(maximumZoomLevelChangedSpy, "count", 2) tryCompare(minimumTiltChangedSpy, "count", 0) tryCompare(maximumTiltChangedSpy, "count", 2) tryCompare(minimumFieldOfViewChangedSpy, "count", 2) tryCompare(maximumFieldOfViewChangedSpy, "count", 2) + } + function test_maptype_metadata() + { + map.activeMapType = map.supportedMapTypes[0] + compare(Object.keys(map.activeMapType.metadata).length, 0) + + map.activeMapType = map.supportedMapTypes[3] + compare(Object.keys(map.activeMapType.metadata).length, 1) + compare(map.activeMapType.metadata['foo'], 42) } } } diff --git a/tests/auto/geotestplugin/qgeotiledmappingmanagerengine_test.h b/tests/auto/geotestplugin/qgeotiledmappingmanagerengine_test.h index 5f6f0116..0a7624ee 100644 --- a/tests/auto/geotestplugin/qgeotiledmappingmanagerengine_test.h +++ b/tests/auto/geotestplugin/qgeotiledmappingmanagerengine_test.h @@ -64,10 +64,22 @@ public: const QByteArray pluginName = "qmlgeo.test.plugin"; QList mapTypes; - mapTypes << QGeoMapType(QGeoMapType::StreetMap, tr("StreetMap"), tr("StreetMap"), false, false, 1, pluginName); - mapTypes << QGeoMapType(QGeoMapType::SatelliteMapDay, tr("SatelliteMapDay"), tr("SatelliteMapDay"), false, false, 2, pluginName); - mapTypes << QGeoMapType(QGeoMapType::CycleMap, tr("CycleMap"), tr("CycleMap"), false, false, 3, pluginName); - mapTypes << QGeoMapType(QGeoMapType::CustomMap, tr("AlternateCameraCapabilities"), tr("AlternateCameraCapabilities"), false, false, 4, pluginName); + mapTypes << QGeoMapType(QGeoMapType::StreetMap, tr("StreetMap"), tr("StreetMap"), false, false, 1, pluginName, capabilities); + mapTypes << QGeoMapType(QGeoMapType::SatelliteMapDay, tr("SatelliteMapDay"), tr("SatelliteMapDay"), false, false, 2, pluginName, capabilities); + mapTypes << QGeoMapType(QGeoMapType::CycleMap, tr("CycleMap"), tr("CycleMap"), false, false, 3, pluginName, capabilities); + + QGeoCameraCapabilities capabilities4; + capabilities4.setMinimumZoomLevel(0.0); + capabilities4.setMaximumZoomLevel(19.0); + capabilities4.setSupportsBearing(true); + capabilities4.setSupportsTilting(true); + capabilities4.setMinimumTilt(0); + capabilities4.setMaximumTilt(80); + capabilities4.setMinimumFieldOfView(1); + capabilities4.setMaximumFieldOfView(179); + QVariantMap meta; + meta["foo"] = 42; + mapTypes << QGeoMapType(QGeoMapType::CustomMap, tr("AlternateCameraCapabilities"), tr("AlternateCameraCapabilities"), false, false, 4, pluginName, capabilities4, meta); setSupportedMapTypes(mapTypes); QGeoTileFetcherTest *fetcher = new QGeoTileFetcherTest(this); @@ -91,28 +103,6 @@ public: { return new QGeoTiledMapTest(this); } - - QGeoCameraCapabilities cameraCapabilities(int mapId) const Q_DECL_OVERRIDE - { - switch (mapId) { - case 4: - { - QGeoCameraCapabilities capabilities; - capabilities.setMinimumZoomLevel(0.0); - capabilities.setMaximumZoomLevel(19.0); - capabilities.setSupportsBearing(true); - capabilities.setSupportsTilting(true); - capabilities.setMinimumTilt(0); - capabilities.setMaximumTilt(80); - capabilities.setMinimumFieldOfView(1); - capabilities.setMaximumFieldOfView(179); - return capabilities; - } - default: - return QGeoMappingManagerEngine::cameraCapabilities(mapId); - } - } - }; #endif diff --git a/tests/auto/maptype/tst_maptype.cpp b/tests/auto/maptype/tst_maptype.cpp index 43d3175c..f571158e 100644 --- a/tests/auto/maptype/tst_maptype.cpp +++ b/tests/auto/maptype/tst_maptype.cpp @@ -28,6 +28,7 @@ #include #include +#include #include @@ -52,9 +53,18 @@ tst_MapType::tst_MapType() {} void tst_MapType::constructorTest() { + QGeoCameraCapabilities capabilities; + capabilities.setMinimumZoomLevel(0.0); + capabilities.setMaximumZoomLevel(20.0); + capabilities.setSupportsBearing(true); + capabilities.setSupportsTilting(true); + capabilities.setMinimumTilt(0); + capabilities.setMaximumTilt(60); + capabilities.setMinimumFieldOfView(20); + capabilities.setMaximumFieldOfView(90); const QByteArray pluginName = "tst_MapType"; QGeoMapType *testObjPtr = new QGeoMapType(QGeoMapType::StreetMap, QStringLiteral("street map"), - QStringLiteral("map description"), true, true, 1, pluginName); + QStringLiteral("map description"), true, true, 1, pluginName, capabilities); QVERIFY(testObjPtr); QCOMPARE(testObjPtr->style(), QGeoMapType::StreetMap); QCOMPARE(testObjPtr->name(), QStringLiteral("street map")); @@ -63,6 +73,8 @@ void tst_MapType::constructorTest() QVERIFY(testObjPtr->night()); QCOMPARE(testObjPtr->mapId(), 1); QCOMPARE(testObjPtr->pluginName(), pluginName); + QCOMPARE(testObjPtr->cameraCapabilities(), capabilities); + QCOMPARE(testObjPtr->metadata(), QVariantMap()); delete testObjPtr; testObjPtr = new QGeoMapType(); @@ -73,6 +85,7 @@ void tst_MapType::constructorTest() QVERIFY2(!testObjPtr->night(), "Wrong default value"); QCOMPARE(testObjPtr->mapId(), 0); QCOMPARE(testObjPtr->pluginName(), QByteArrayLiteral("")); + QCOMPARE(testObjPtr->cameraCapabilities(), QGeoCameraCapabilities()); delete testObjPtr; } @@ -83,57 +96,82 @@ void tst_MapType::comparison_data() QTest::addColumn("expected"); const QByteArray pluginName = "tst_MapType"; + QGeoCameraCapabilities capabilities; + capabilities.setMinimumZoomLevel(0.0); + capabilities.setMaximumZoomLevel(20.0); + capabilities.setSupportsBearing(true); + capabilities.setSupportsTilting(true); + capabilities.setMinimumTilt(0); + capabilities.setMaximumTilt(60); + capabilities.setMinimumFieldOfView(20); + capabilities.setMaximumFieldOfView(90); + QGeoCameraCapabilities capabilities2 = capabilities; + capabilities2.setMaximumFieldOfView(80); QTest::newRow("null") << QGeoMapType() << QGeoMapType() << true; QTest::newRow("equal") << QGeoMapType(QGeoMapType::StreetMap, QStringLiteral("street name"), - QStringLiteral("street desc"), false, false, 42, pluginName) + QStringLiteral("street desc"), false, false, 42, pluginName, capabilities) << QGeoMapType(QGeoMapType::StreetMap, QStringLiteral("street name"), - QStringLiteral("street desc"), false, false, 42, pluginName) + QStringLiteral("street desc"), false, false, 42, pluginName, capabilities) << true; QTest::newRow("style") << QGeoMapType(QGeoMapType::StreetMap, QStringLiteral("street name"), - QStringLiteral("street desc"), false, false, 42, pluginName) + QStringLiteral("street desc"), false, false, 42, pluginName, capabilities) << QGeoMapType(QGeoMapType::TerrainMap, QStringLiteral("street name"), - QStringLiteral("street desc"), false, false, 42, pluginName) + QStringLiteral("street desc"), false, false, 42, pluginName, capabilities) << false; QTest::newRow("name") << QGeoMapType(QGeoMapType::StreetMap, QStringLiteral("street name"), - QStringLiteral("street desc"), false, false, 42, pluginName) + QStringLiteral("street desc"), false, false, 42, pluginName, capabilities) << QGeoMapType(QGeoMapType::StreetMap, QStringLiteral("different name"), - QStringLiteral("street desc"), false, false, 42, pluginName) + QStringLiteral("street desc"), false, false, 42, pluginName, capabilities) << false; QTest::newRow("description") << QGeoMapType(QGeoMapType::StreetMap, QStringLiteral("street name"), - QStringLiteral("street desc"), false, false, 42, pluginName) + QStringLiteral("street desc"), false, false, 42, pluginName, capabilities) << QGeoMapType(QGeoMapType::StreetMap, QStringLiteral("street name"), - QStringLiteral("different desc"), false, false, 42, pluginName) + QStringLiteral("different desc"), false, false, 42, pluginName, capabilities) << false; QTest::newRow("mobile") << QGeoMapType(QGeoMapType::StreetMap, QStringLiteral("street name"), - QStringLiteral("street desc"), false, false, 42, pluginName) + QStringLiteral("street desc"), false, false, 42, pluginName, capabilities) << QGeoMapType(QGeoMapType::StreetMap, QStringLiteral("street name"), - QStringLiteral("street desc"), true, false, 42, pluginName) + QStringLiteral("street desc"), true, false, 42, pluginName, capabilities) << false; QTest::newRow("night") << QGeoMapType(QGeoMapType::StreetMap, QStringLiteral("street name"), - QStringLiteral("street desc"), false, false, 42, pluginName) + QStringLiteral("street desc"), false, false, 42, pluginName, capabilities) << QGeoMapType(QGeoMapType::StreetMap, QStringLiteral("street name"), - QStringLiteral("street desc"), false, true, 42, pluginName) + QStringLiteral("street desc"), false, true, 42, pluginName, capabilities) << false; QTest::newRow("id") << QGeoMapType(QGeoMapType::StreetMap, QStringLiteral("street name"), - QStringLiteral("street desc"), false, false, 42, pluginName) + QStringLiteral("street desc"), false, false, 42, pluginName, capabilities) << QGeoMapType(QGeoMapType::StreetMap, QStringLiteral("street name"), - QStringLiteral("street desc"), false, false, 99, pluginName) + QStringLiteral("street desc"), false, false, 99, pluginName, capabilities) << false; QTest::newRow("plugin_name") << QGeoMapType(QGeoMapType::StreetMap, QStringLiteral("street name"), - QStringLiteral("street desc"), false, false, 42, pluginName) + QStringLiteral("street desc"), false, false, 42, pluginName, capabilities) << QGeoMapType(QGeoMapType::StreetMap, QStringLiteral("street name"), - QStringLiteral("street desc"), false, false, 42, QByteArrayLiteral("abc")) + QStringLiteral("street desc"), false, false, 42, QByteArrayLiteral("abc"), capabilities) + << false; + + QTest::newRow("camera_capabilities") << QGeoMapType(QGeoMapType::StreetMap, QStringLiteral("street name"), + QStringLiteral("street desc"), false, false, 42, pluginName, capabilities) + << QGeoMapType(QGeoMapType::StreetMap, QStringLiteral("street name"), + QStringLiteral("street desc"), false, false, 42, pluginName, capabilities2) + << false; + + QVariantMap metadata; + metadata["foo"] = 42; + QTest::newRow("metadata") << QGeoMapType(QGeoMapType::StreetMap, QStringLiteral("street name"), + QStringLiteral("street desc"), false, false, 42, pluginName, capabilities) + << QGeoMapType(QGeoMapType::StreetMap, QStringLiteral("street name"), + QStringLiteral("street desc"), false, false, 42, pluginName, capabilities, metadata) << false; } diff --git a/tests/auto/qgeocameratiles/tst_qgeocameratiles.cpp b/tests/auto/qgeocameratiles/tst_qgeocameratiles.cpp index 0c664ba6..49c4657e 100644 --- a/tests/auto/qgeocameratiles/tst_qgeocameratiles.cpp +++ b/tests/auto/qgeocameratiles/tst_qgeocameratiles.cpp @@ -150,7 +150,7 @@ void tst_QGeoCameraTiles::tilesPlugin() ct.setTileSize(16); ct.setCameraData(camera); ct.setScreenSize(QSize(32, 32)); - ct.setMapType(QGeoMapType(QGeoMapType::StreetMap, "street map", "street map", false, false, 1, QByteArrayLiteral(""))); + ct.setMapType(QGeoMapType(QGeoMapType::StreetMap, "street map", "street map", false, false, 1, QByteArrayLiteral(""), QGeoCameraCapabilities())); QSet tiles1 = ct.createTiles(); @@ -202,7 +202,7 @@ void tst_QGeoCameraTiles::tilesMapType() QSet tiles1 = ct.createTiles(); - QGeoMapType mapType1 = QGeoMapType(QGeoMapType::StreetMap, "street map", "street map", false, false, 1, QByteArrayLiteral("")); + QGeoMapType mapType1 = QGeoMapType(QGeoMapType::StreetMap, "street map", "street map", false, false, 1, QByteArrayLiteral(""), QGeoCameraCapabilities()); ct.setMapType(mapType1); QSet tiles2 = ct.createTiles(); @@ -220,7 +220,7 @@ void tst_QGeoCameraTiles::tilesMapType() QCOMPARE(tiles2, tiles2_check); - QGeoMapType mapType2 = QGeoMapType(QGeoMapType::StreetMap, "satellite map", "satellite map", false, false, 2, QByteArrayLiteral("")); + QGeoMapType mapType2 = QGeoMapType(QGeoMapType::StreetMap, "satellite map", "satellite map", false, false, 2, QByteArrayLiteral(""), QGeoCameraCapabilities()); ct.setMapType(mapType2); QSet tiles3 = ct.createTiles(); diff --git a/tests/auto/qgeotiledmap/tst_qgeotiledmap.cpp b/tests/auto/qgeotiledmap/tst_qgeotiledmap.cpp index ae0083ba..7eb1ed51 100644 --- a/tests/auto/qgeotiledmap/tst_qgeotiledmap.cpp +++ b/tests/auto/qgeotiledmap/tst_qgeotiledmap.cpp @@ -113,6 +113,7 @@ void tst_QGeoTiledMap::initTestCase() m_map.reset(static_cast(mappingManager->createMap(this))); QVERIFY(m_map); m_map->setViewportSize(QSize(256, 256)); + m_map->setActiveMapType(m_map->m_engine->supportedMapTypes().first()); m_fetcher = static_cast(m_map->m_engine->tileFetcher()); m_tilesCounter.reset(new FetchTileCounter()); connect(m_fetcher, SIGNAL(tileFetched(const QGeoTileSpec&)), m_tilesCounter.data(), SLOT(tileFetched(const QGeoTileSpec&))); -- cgit v1.2.1