summaryrefslogtreecommitdiff
path: root/src/location/maps/qgeomap_p_p.h
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2017-01-19 00:30:19 +0100
committerPaolo Angelelli <paolo.angelelli@qt.io>2017-01-30 09:29:09 +0000
commit0a5dd29d4b02a192ec7e691cf88f623152ce100b (patch)
tree9d1975b4cf1f61ed3aa56af8d98443632e8c21ba /src/location/maps/qgeomap_p_p.h
parent1946896ace3f5fa8b6086fb416ea934fea387f12 (diff)
downloadqtlocation-0a5dd29d4b02a192ec7e691cf88f623152ce100b.tar.gz
Allow QGeoMap to render map items
Currently QtLocation Map items are always rendered by QtLocation, on top of what QGeoMap generates. This patch introduces a new private api call to QGeoMap, supportedMapItemTypes(), that is used to inform QtLocation to not render map items of those types, but rather pass them over to the QGeoMap, which will take care of the rendering. In this way, more advanced renderers can properly render map items, for example below labels or 3D buildings. Change-Id: I1c82d4f11d4dd44c3011926512520d62e26295d4 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/location/maps/qgeomap_p_p.h')
-rw-r--r--src/location/maps/qgeomap_p_p.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/location/maps/qgeomap_p_p.h b/src/location/maps/qgeomap_p_p.h
index 625cd676..ab603be7 100644
--- a/src/location/maps/qgeomap_p_p.h
+++ b/src/location/maps/qgeomap_p_p.h
@@ -54,6 +54,7 @@
#include <QtCore/private/qobject_p.h>
#include <QtCore/QSize>
#include <QtCore/QSet>
+#include "qgeomap_p.h"
QT_BEGIN_NAMESPACE
@@ -62,6 +63,7 @@ class QGeoMappingManagerEngine;
class QGeoMap;
class QGeoMapController;
class QGeoMapParameter;
+class QDeclarativeGeoMapItemBase;
class Q_LOCATION_PRIVATE_EXPORT QGeoMapPrivate : public QObjectPrivate
{
@@ -76,6 +78,10 @@ protected:
virtual void addParameter(QGeoMapParameter *param);
virtual void removeParameter(QGeoMapParameter *param);
+ virtual QGeoMap::ItemTypes supportedMapItemTypes() const;
+ virtual void addMapItem(QDeclarativeGeoMapItemBase *item);
+ virtual void removeMapItem(QDeclarativeGeoMapItemBase *item);
+
virtual void changeViewportSize(const QSize &size) = 0; // called by QGeoMap::setSize()
virtual void changeCameraData(const QGeoCameraData &oldCameraData) = 0; // called by QGeoMap::setCameraData()
virtual void changeActiveMapType(const QGeoMapType mapType) = 0; // called by QGeoMap::setActiveMapType()
@@ -87,6 +93,7 @@ protected:
QGeoCameraData m_cameraData;
QGeoMapType m_activeMapType;
QSet<QGeoMapParameter *> m_mapParameters;
+ QSet<QDeclarativeGeoMapItemBase *> m_mapItems;
};
QT_END_NAMESPACE