[Qt] Use QVariantMap in QQuickMapboxGLStyleProperty

This commit is contained in:
Bruno de Oliveira Abinader
2016-08-02 15:51:16 +03:00
parent aa13acdb87
commit 5057d7ef5d
5 changed files with 29 additions and 57 deletions

View File

@@ -156,7 +156,12 @@ void QQuickMapboxGL::setColor(const QColor &color)
m_color = color;
setPaintProperty("background", "background-color", color);
QVariantMap paintProperty;
paintProperty["type"] = QQuickMapboxGLLayoutStyleProperty::PaintType;
paintProperty["layer"] = "background";
paintProperty["property"] = "background-color";
paintProperty["value"] = color;
onStylePropertyUpdated(paintProperty);
emit colorChanged(m_color);
}
@@ -174,18 +179,6 @@ void QQuickMapboxGL::pan(int dx, int dy)
update();
}
void QQuickMapboxGL::setLayoutProperty(const QString &layer, const QString &property, const QVariant &value)
{
m_layoutChanges.append(LayoutPropertyChange { layer, property, value });
update();
}
void QQuickMapboxGL::setPaintProperty(const QString &layer, const QString &property, const QVariant &value, const QString &klass)
{
m_paintChanges.append(PaintPropertyChange { layer, property, value, klass });
update();
}
void QQuickMapboxGL::setStyle(const QString &styleUrl)
{
if (m_style == styleUrl) {