summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <thiago@mapbox.com>2016-04-28 18:31:34 +0300
committerThiago Marcos P. Santos <thiago@mapbox.com>2016-05-02 19:33:54 +0300
commitc8d6540bc1dcf75a51ecfcfaae638419ae778c60 (patch)
tree4cf9bc15c3b73bde34c5e569cb508630f4983e6b
parent1ac75a718de87fa52caefda3ff00ef437848f204 (diff)
downloadqtlocation-mapboxgl-c8d6540bc1dcf75a51ecfcfaae638419ae778c60.tar.gz
[Qt] Added plugin stub
-rw-r--r--platform/qt/include/qquickmapboxgl.hpp6
-rw-r--r--platform/qt/src/qquickmapboxgl.cpp11
2 files changed, 17 insertions, 0 deletions
diff --git a/platform/qt/include/qquickmapboxgl.hpp b/platform/qt/include/qquickmapboxgl.hpp
index 4563d6d859..906087f7b6 100644
--- a/platform/qt/include/qquickmapboxgl.hpp
+++ b/platform/qt/include/qquickmapboxgl.hpp
@@ -6,6 +6,7 @@
#include <QGeoShape>
#include <QQuickFramebufferObject>
+class QDeclarativeGeoServiceProvider;
class QQuickItem;
class Q_DECL_EXPORT QQuickMapboxGL : public QQuickFramebufferObject
@@ -13,6 +14,7 @@ class Q_DECL_EXPORT QQuickMapboxGL : public QQuickFramebufferObject
Q_OBJECT
Q_ENUMS(QGeoServiceProvider::Error)
+ Q_PROPERTY(QDeclarativeGeoServiceProvider *plugin READ plugin WRITE setPlugin NOTIFY pluginChanged)
Q_PROPERTY(qreal minimumZoomLevel READ minimumZoomLevel WRITE setMinimumZoomLevel NOTIFY minimumZoomLevelChanged)
Q_PROPERTY(qreal maximumZoomLevel READ maximumZoomLevel WRITE setMaximumZoomLevel NOTIFY maximumZoomLevelChanged)
Q_PROPERTY(qreal zoomLevel READ zoomLevel WRITE setZoomLevel NOTIFY zoomLevelChanged)
@@ -30,6 +32,9 @@ public:
// QQuickFramebufferObject implementation.
virtual Renderer *createRenderer() const Q_DECL_FINAL;
+ void setPlugin(QDeclarativeGeoServiceProvider *plugin);
+ QDeclarativeGeoServiceProvider *plugin() const;
+
void setMinimumZoomLevel(qreal minimumZoomLevel);
qreal minimumZoomLevel() const;
@@ -69,6 +74,7 @@ signals:
void centerChanged(const QGeoCoordinate &coordinate);
// Compatibility with Map QML Type, but no-op.
+ void pluginChanged(QDeclarativeGeoServiceProvider *plugin);
void errorChanged();
void copyrightLinkActivated(const QString &link);
void copyrightsVisibleChanged(bool visible);
diff --git a/platform/qt/src/qquickmapboxgl.cpp b/platform/qt/src/qquickmapboxgl.cpp
index 186703afe7..b31055b587 100644
--- a/platform/qt/src/qquickmapboxgl.cpp
+++ b/platform/qt/src/qquickmapboxgl.cpp
@@ -23,6 +23,17 @@ QQuickFramebufferObject::Renderer *QQuickMapboxGL::createRenderer() const
return new QQuickMapboxGLRenderer();
}
+void QQuickMapboxGL::setPlugin(QDeclarativeGeoServiceProvider *)
+{
+ qWarning() << __PRETTY_FUNCTION__
+ << "Not implemented.";
+}
+
+QDeclarativeGeoServiceProvider *QQuickMapboxGL::plugin() const
+{
+ return nullptr;
+}
+
void QQuickMapboxGL::setMinimumZoomLevel(qreal zoom)
{
zoom = qMax(0., zoom);