summaryrefslogtreecommitdiff
path: root/include/mbgl/style
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2019-09-10 19:32:25 +0300
committerBruno de Oliveira Abinader <bruno@mapbox.com>2019-09-11 14:29:26 +0300
commitdfaa859d9957028c24a27fe33f6760a0096d5cb1 (patch)
treee40656b9c693691b91340e74de165912e864ba28 /include/mbgl/style
parent102a07cc63a4fb4a938893de36d8f459ca931f7a (diff)
downloadqtlocation-mapboxgl-dfaa859d9957028c24a27fe33f6760a0096d5cb1.tar.gz
[core] Expose mbgl::style::Light::setProperty
Works the same way as mbgl::style::set{Paint,Layout}Property functions.
Diffstat (limited to 'include/mbgl/style')
-rw-r--r--include/mbgl/style/light.hpp4
-rw-r--r--include/mbgl/style/light.hpp.ejs4
2 files changed, 8 insertions, 0 deletions
diff --git a/include/mbgl/style/light.hpp b/include/mbgl/style/light.hpp
index 0b65df9f1b..21a05cf4c8 100644
--- a/include/mbgl/style/light.hpp
+++ b/include/mbgl/style/light.hpp
@@ -2,6 +2,7 @@
#pragma once
+#include <mbgl/style/conversion.hpp>
#include <mbgl/style/property_value.hpp>
#include <mbgl/style/transition_options.hpp>
#include <mbgl/style/types.hpp>
@@ -17,6 +18,9 @@ public:
Light();
~Light();
+ // Dynamic properties
+ optional<conversion::Error> setProperty(const std::string& name, const conversion::Convertible& value);
+
static LightAnchorType getDefaultAnchor();
PropertyValue<LightAnchorType> getAnchor() const;
void setAnchor(PropertyValue<LightAnchorType>);
diff --git a/include/mbgl/style/light.hpp.ejs b/include/mbgl/style/light.hpp.ejs
index adc5b651e3..c3001d982b 100644
--- a/include/mbgl/style/light.hpp.ejs
+++ b/include/mbgl/style/light.hpp.ejs
@@ -5,6 +5,7 @@
#pragma once
+#include <mbgl/style/conversion.hpp>
#include <mbgl/style/property_value.hpp>
#include <mbgl/style/transition_options.hpp>
#include <mbgl/style/types.hpp>
@@ -20,6 +21,9 @@ public:
Light();
~Light();
+ // Dynamic properties
+ optional<conversion::Error> setProperty(const std::string& name, const conversion::Convertible& value);
+
<% for (const property of properties) { -%>
static <%- evaluatedType(property) %> getDefault<%- camelize(property.name) %>();
<%- propertyValueType(property) %> get<%- camelize(property.name) %>() const;