summaryrefslogtreecommitdiff
path: root/include/llmr/style
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-06-27 19:11:57 +0200
committerKonstantin Käfer <mail@kkaefer.com>2014-06-27 19:11:57 +0200
commita41f0db7dd81f4c9163965d252769cab7e430feb (patch)
treec01c1887c7df197f8a027cef3eff2caad8235d0e /include/llmr/style
parent48019ae85cb5369babefa7ff78376146f14987a1 (diff)
downloadqtlocation-mapboxgl-a41f0db7dd81f4c9163965d252769cab7e430feb.tar.gz
add way for adding/removing classes
Diffstat (limited to 'include/llmr/style')
-rw-r--r--include/llmr/style/style_layer.hpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/llmr/style/style_layer.hpp b/include/llmr/style/style_layer.hpp
index fe5d3c3a6f..b45982b794 100644
--- a/include/llmr/style/style_layer.hpp
+++ b/include/llmr/style/style_layer.hpp
@@ -5,11 +5,13 @@
#include <llmr/style/class_properties.hpp>
#include <llmr/style/style_properties.hpp>
#include <llmr/style/rasterize_properties.hpp>
+#include <llmr/style/applied_class_properties.hpp>
#include <vector>
#include <memory>
#include <string>
#include <map>
+#include <set>
namespace llmr {
@@ -33,6 +35,15 @@ public:
bool isBackground() const;
+ // Sets the list of classes and creates transitions to the currently applied values.
+ void setClasses(const std::vector<std::string> &class_names, timestamp now,
+ const ClassPropertyTransition &defaultTransition);
+
+private:
+ // Applies all properties from a class, if they haven't been applied already.
+ void applyClassProperties(ClassID class_id, std::set<PropertyKey> &already_applied,
+ timestamp now, const ClassPropertyTransition &defaultTransition);
+
public:
// The name of this layer.
const std::string id;
@@ -44,6 +55,12 @@ public:
// Contains all style classes that can be applied to this layer.
const std::map<ClassID, ClassProperties> styles;
+private:
+ // For every property, stores a list of applied property values, with
+ // optional transition times.
+ std::map<PropertyKey, AppliedClassProperties> appliedStyle;
+
+public:
// Stores the evaluated, and cascaded styling information, specific to this
// layer's type.
StyleProperties style;