[Qt] Added plugin stub

This commit is contained in:
Thiago Marcos P. Santos
2016-04-28 18:31:34 +03:00
parent 1ac75a718d
commit c8d6540bc1
2 changed files with 17 additions and 0 deletions

View File

@@ -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);

View File

@@ -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);