summaryrefslogtreecommitdiff
path: root/src/plugins/geoservices/esri
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2017-01-28 14:52:08 +0100
committerPaolo Angelelli <paolo.angelelli@qt.io>2017-01-31 12:26:16 +0000
commit92c97cda0496e0770488dc069c665248159f7230 (patch)
treec6c9c2487def3da3bfd9cc395fab92882c624862 /src/plugins/geoservices/esri
parentfa58926f51b532bd82baf9cd9f1e75548139235a (diff)
downloadqtlocation-92c97cda0496e0770488dc069c665248159f7230.tar.gz
Add color and style properties to QDeclarativeGeoMapCopyrightNotice
This patch adds two new properties to the MapCopyrightNotice element to allow changing the background color and content style of the notice. backgroundColor controls the color of the background of the element. styleSheet, on the other hand, sets a stylesheet to the html, which allows to change color, font and size of the html. To make this work, the html output from the plugins has to be properly enclosed in <body></body> tags. Change-Id: I776f78f4b26b5b2cf04510a9fbc6302334b09c61 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src/plugins/geoservices/esri')
-rw-r--r--src/plugins/geoservices/esri/geotiledmap_esri.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/geoservices/esri/geotiledmap_esri.cpp b/src/plugins/geoservices/esri/geotiledmap_esri.cpp
index 9171fc2b..8caf055d 100644
--- a/src/plugins/geoservices/esri/geotiledmap_esri.cpp
+++ b/src/plugins/geoservices/esri/geotiledmap_esri.cpp
@@ -44,6 +44,11 @@
QT_BEGIN_NAMESPACE
+static QString bodify(const QString &html)
+{
+ return QStringLiteral("<body>") + html + QStringLiteral("</body>");
+}
+
GeoTiledMapEsri::GeoTiledMapEsri(GeoTiledMappingManagerEngineEsri *engine, QObject *parent) :
QGeoTiledMap(engine, parent), m_engine(engine), m_mapId(-1)
{
@@ -67,7 +72,7 @@ void GeoTiledMapEsri::evaluateCopyrights(const QSet<QGeoTileSpec> &visibleTiles)
GeoMapSource *mapSource = engine()->mapSource(m_mapId);
if (mapSource)
- emit copyrightsChanged(mapSource->copyright());
+ emit copyrightsChanged(bodify(mapSource->copyright()));
}
QT_END_NAMESPACE