diff options
author | Paolo Angelelli <paolo.angelelli@qt.io> | 2017-07-18 11:26:29 +0200 |
---|---|---|
committer | Paolo Angelelli <paolo.angelelli@qt.io> | 2017-07-31 12:59:58 +0000 |
commit | 11da6dec6d47e7670482ed146cced92573cc0b85 (patch) | |
tree | dbfb0e3a4f48b1f5e827d48c2ffcf327d5cb3511 /src/location/declarativemaps/qdeclarativegeomap.cpp | |
parent | a4a8d12237c630017a0093823fa9dc9848620eed (diff) | |
download | qtlocation-11da6dec6d47e7670482ed146cced92573cc0b85.tar.gz |
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 <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src/location/declarativemaps/qdeclarativegeomap.cpp')
-rw-r--r-- | src/location/declarativemaps/qdeclarativegeomap.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
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); } } |