Files
MapLibreParticleLab/platform/qt/include/qquickmapboxglstyle.hpp
Bruno de Oliveira Abinader 8843bebee2 [Qt] Added QQuickMapboxGLStyle
A QQuickMapboxGLStyleProperty being a child of QQuickMapboxGLStyle
assures that only properties associated with that particular style will
reflect on the map - and that happens only when the style is the current
set via style property.
2016-08-17 15:21:52 +03:00

40 lines
941 B
C++

#ifndef QQUICKMAPBOXGLSTYLE_H
#define QQUICKMAPBOXGLSTYLE_H
#include <QQuickItem>
class Q_DECL_EXPORT QQuickMapboxGLStyle : public QQuickItem
{
Q_OBJECT
Q_PROPERTY(QString url READ url WRITE setUrl NOTIFY urlChanged)
Q_PROPERTY(QString styleClass READ styleClass WRITE setStyleClass NOTIFY classChanged)
public:
QQuickMapboxGLStyle(QQuickItem *parent = Q_NULLPTR);
virtual ~QQuickMapboxGLStyle() {}
// QQuickItem implementation
virtual void itemChange(QQuickItem::ItemChange, const QQuickItem::ItemChangeData &);
void setUrl(const QString &);
QString url() const;
void setStyleClass(const QString &);
QString styleClass() const;
signals:
void urlChanged(const QString &);
void classChanged(const QString &);
void propertyUpdated(const QVariantMap &);
private:
QString m_url;
QString m_class;
};
QML_DECLARE_TYPE(QQuickMapboxGLStyle)
#endif // QQUICKMAPBOXGLSTYLE_H