summaryrefslogtreecommitdiff
path: root/src/location/declarativemaps/qdeclarativegeomap.cpp
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <tmpsantos@gmail.com>2017-02-08 16:15:58 +0200
committerPaolo Angelelli <paolo.angelelli@qt.io>2017-02-13 15:26:39 +0000
commit68b515cdff46dc1030b027a664ef5f3f6cde946a (patch)
tree6d4ac87cd512f25c21005be46e17d446d3ac379b /src/location/declarativemaps/qdeclarativegeomap.cpp
parent331d8fe606ce0355a7126eb8b68749ceb8b3f15f (diff)
downloadqtlocation-68b515cdff46dc1030b027a664ef5f3f6cde946a.tar.gz
Default style for the copyright defined on the plugin
The Mapbox GL plugin defines a logo image on the copyright notice that needs styling in order to have an appealing look and feel. The default style is empty, so we need to fetch one for the plugin to make this work. Task-number: QTBUG-58601 Change-Id: Ib3f7d7d7fcb2797c6381fc862ce7513b516c9ff5 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
Diffstat (limited to 'src/location/declarativemaps/qdeclarativegeomap.cpp')
-rw-r--r--src/location/declarativemaps/qdeclarativegeomap.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/location/declarativemaps/qdeclarativegeomap.cpp b/src/location/declarativemaps/qdeclarativegeomap.cpp
index 20e61ed3..95df9235 100644
--- a/src/location/declarativemaps/qdeclarativegeomap.cpp
+++ b/src/location/declarativemaps/qdeclarativegeomap.cpp
@@ -255,6 +255,8 @@ void QDeclarativeGeoMap::onMapChildrenChanged()
if (!copyrights) {
// create a new one and set its parent, re-assign it to the weak pointer, then connect the copyrights-change signal
m_copyrights = new QDeclarativeGeoMapCopyrightNotice(this);
+ m_copyrights->onCopyrightsStyleSheetChanged(m_map->copyrightsStyleSheet());
+
copyrights = m_copyrights.data();
connect(m_map, SIGNAL(copyrightsChanged(QImage)),
@@ -267,6 +269,9 @@ void QDeclarativeGeoMap::onMapChildrenChanged()
connect(m_map, SIGNAL(copyrightsChanged(QString)),
this, SIGNAL(copyrightsChanged(QString)));
+ connect(m_map, SIGNAL(copyrightsStyleSheetChanged(QString)),
+ copyrights, SLOT(onCopyrightsStyleSheetChanged(QString)));
+
connect(copyrights, SIGNAL(linkActivated(QString)),
this, SIGNAL(copyrightLinkActivated(QString)));
@@ -671,6 +676,7 @@ void QDeclarativeGeoMap::mappingManagerInitialized()
}
m_copyrights = new QDeclarativeGeoMapCopyrightNotice(this);
+ m_copyrights->onCopyrightsStyleSheetChanged(m_map->copyrightsStyleSheet());
connect(m_map, SIGNAL(copyrightsChanged(QImage)),
m_copyrights.data(), SLOT(copyrightsChanged(QImage)));
@@ -682,6 +688,9 @@ void QDeclarativeGeoMap::mappingManagerInitialized()
connect(m_map, SIGNAL(copyrightsChanged(QString)),
this, SIGNAL(copyrightsChanged(QString)));
+ connect(m_map, SIGNAL(copyrightsStyleSheetChanged(QString)),
+ m_copyrights.data(), SLOT(onCopyrightsStyleSheetChanged(QString)));
+
connect(m_copyrights.data(), SIGNAL(linkActivated(QString)),
this, SIGNAL(copyrightLinkActivated(QString)));
connect(m_map, &QGeoMap::sgNodeChanged, this, &QQuickItem::update);