summaryrefslogtreecommitdiff
path: root/src/plugins/geoservices/nokia
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@theqtcompany.com>2016-03-01 16:24:40 +0100
committerMichal Klocek <michal.klocek@theqtcompany.com>2016-03-17 06:56:11 +0000
commitde165175549642c7fefa901d41ee96ef0702879c (patch)
treec89145289e0a7147870bef06bfb8755440837d10 /src/plugins/geoservices/nokia
parent3d8da84e368f87386f14287b10fb6d08e3ce2b48 (diff)
downloadqtlocation-de165175549642c7fefa901d41ee96ef0702879c.tar.gz
Remove QGeoMapController from QGeoMap
Refactor code to use QGeoCameraData directly. All functionality related to zoom, center boundary checks are now handled in QDeclaratvieGeoMap class. This makes handling of center and zoomLevel properties much simpler and less error prone, since camera data can not be modified along the call stack. As result we avoid forwarding change signals back and forth: * qgeodeclarativegeomap::setCenter -> qgeomapcontroller::setCenter * qgeomapcontroller::setCenter -> qgeomap::setCameraData * qgeomap::setCameraData -> qgeomacontroller::cameraDataChanged * qgeomapcontroller::cameraDataChanged -> emit qdecalartivegeomap::centerChanged Call always setCenter and setZoomLevel on qdeclarativegeomap instance instead. Introduce initialize() method to handle cases where map plugin is loaded and scenegraph geometery is not yet set. This is required to correctly handle new boundary checks to limit grey areas. Change-Id: I6066cefd4a648dc76333dc241d1f261451a32e9c Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src/plugins/geoservices/nokia')
-rw-r--r--src/plugins/geoservices/nokia/qgeotiledmap_nokia.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/geoservices/nokia/qgeotiledmap_nokia.cpp b/src/plugins/geoservices/nokia/qgeotiledmap_nokia.cpp
index 98777d09..d83ad0f9 100644
--- a/src/plugins/geoservices/nokia/qgeotiledmap_nokia.cpp
+++ b/src/plugins/geoservices/nokia/qgeotiledmap_nokia.cpp
@@ -36,7 +36,6 @@
#include "qgeotiledmap_nokia.h"
#include "qgeotiledmappingmanagerengine_nokia.h"
-#include "qgeomapcontroller_p.h"
#include <QDebug>
#include <QObject>
@@ -71,7 +70,7 @@ void QGeoTiledMapNokia::evaluateCopyrights(const QSet<QGeoTileSpec> &visibleTile
if (m_engine.isNull())
return;
- const QString copyrightsString = m_engine->evaluateCopyrightsText(activeMapType(), mapController()->zoom(), visibleTiles);
+ const QString copyrightsString = m_engine->evaluateCopyrightsText(activeMapType(), cameraData().zoomLevel(), visibleTiles);
if (width() > 0 && height() > 0 && ((copyrightsString.isNull() && m_copyrightsSlab.isNull()) || copyrightsString != m_lastCopyrightsString)) {
QFont font("Sans Serif");