From f30765254807bedab0873a289a118906ef74b754 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguye=CC=82=CC=83n?= Date: Sat, 13 Aug 2016 11:30:15 -0700 Subject: [core] Source-driven attribution MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implemented observer callbacks so the style knows when the source’s attribution changes and the map knows when the style’s attribution changes. Also implemented a getter for a tile source’s attribution. Fixes #2723. --- platform/qt/include/qmapbox.hpp | 3 ++- platform/qt/include/qmapboxgl.hpp | 1 - platform/qt/src/qmapbox.cpp | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) (limited to 'platform') diff --git a/platform/qt/include/qmapbox.hpp b/platform/qt/include/qmapbox.hpp index dcdc33d59d..0a6a41b3e1 100644 --- a/platform/qt/include/qmapbox.hpp +++ b/platform/qt/include/qmapbox.hpp @@ -45,7 +45,8 @@ enum MapChange { MapChangeWillStartRenderingMap, MapChangeDidFinishRenderingMap, MapChangeDidFinishRenderingMapFullyRendered, - MapChangeDidFinishLoadingStyle + MapChangeDidFinishLoadingStyle, + MapChangeSourceAttributionDidChange }; struct Q_DECL_EXPORT CameraOptions { diff --git a/platform/qt/include/qmapboxgl.hpp b/platform/qt/include/qmapboxgl.hpp index fec96e6fb7..ba5631e1e4 100644 --- a/platform/qt/include/qmapboxgl.hpp +++ b/platform/qt/include/qmapboxgl.hpp @@ -95,7 +95,6 @@ public: NorthLeftwards, }; - QMapboxGL(QObject *parent = 0, const QMapboxGLSettings& = QMapboxGLSettings()); virtual ~QMapboxGL(); diff --git a/platform/qt/src/qmapbox.cpp b/platform/qt/src/qmapbox.cpp index 5f4ad01873..4a871c151d 100644 --- a/platform/qt/src/qmapbox.cpp +++ b/platform/qt/src/qmapbox.cpp @@ -32,6 +32,7 @@ static_assert(mbgl::underlying_type(QMapbox::MapChangeWillStartRenderingMap) == static_assert(mbgl::underlying_type(QMapbox::MapChangeDidFinishRenderingMap) == mbgl::underlying_type(mbgl::MapChangeDidFinishRenderingMap), "error"); static_assert(mbgl::underlying_type(QMapbox::MapChangeDidFinishRenderingMapFullyRendered) == mbgl::underlying_type(mbgl::MapChangeDidFinishRenderingMapFullyRendered), "error"); static_assert(mbgl::underlying_type(QMapbox::MapChangeDidFinishLoadingStyle) == mbgl::underlying_type(mbgl::MapChangeDidFinishLoadingStyle), "error"); +static_assert(mbgl::underlying_type(QMapbox::MapChangeSourceAttributionDidChange) == mbgl::underlying_type(mbgl::MapChangeSourceAttributionDidChange), "error"); namespace QMapbox { -- cgit v1.2.1