summaryrefslogtreecommitdiff
path: root/src/location/maps/qgeotiledmap.cpp
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2016-09-13 19:17:16 +0200
committerPaolo Angelelli <paolo.angelelli@qt.io>2016-12-01 13:45:44 +0000
commit5e4bc1fe908896e9b90e8ad9c3896f35b5ec37be (patch)
tree8f63f0c53943326b5243d422b95112ebf07f307f /src/location/maps/qgeotiledmap.cpp
parente568470c6409febdb5187e3f53af32164c63169f (diff)
downloadqtlocation-5e4bc1fe908896e9b90e8ad9c3896f35b5ec37be.tar.gz
MapParameters for accessing specific features of custom QGeoMaps
This patch adds a new MapParameter object to give users access to specific features of a custom QGeoMap otherwise not accessible through the standard API. A MapParameter is implemented by a QDeclarativeGeoMapParameter, which, in turns, inherits from QGeoMapParameter in the location module. In this way QGeoMap & subclasses won't depend on declarative, from this side, still allowing a QMapWidget someday. The implementation is based, on both sides, on the dynamic properties of QObjects for defining the MapProperty data. This allows high flexibility in defining various types of MapParameters (essentially by duck typing them), and therefore each plugin which makes use of them must document each of them. Change-Id: I5f3a8c18e996f290beb8e4ff37d3c2c655eefc6c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/location/maps/qgeotiledmap.cpp')
-rw-r--r--src/location/maps/qgeotiledmap.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/location/maps/qgeotiledmap.cpp b/src/location/maps/qgeotiledmap.cpp
index fedaecbc..2cf815af 100644
--- a/src/location/maps/qgeotiledmap.cpp
+++ b/src/location/maps/qgeotiledmap.cpp
@@ -60,6 +60,17 @@ QGeoTiledMap::QGeoTiledMap(QGeoTiledMappingManagerEngine *engine, QObject *paren
this,&QGeoTiledMap::handleTileVersionChanged);
}
+QGeoTiledMap::QGeoTiledMap(QGeoTiledMapPrivate &dd, QGeoTiledMappingManagerEngine *engine, QObject *parent)
+ : QGeoMap(dd, parent)
+{
+ Q_D(QGeoTiledMap);
+
+ d->m_tileRequests = new QGeoTileRequestManager(this, engine);
+
+ QObject::connect(engine,&QGeoTiledMappingManagerEngine::tileVersionChanged,
+ this,&QGeoTiledMap::handleTileVersionChanged);
+}
+
QGeoTiledMap::~QGeoTiledMap()
{
Q_D(QGeoTiledMap);