diff options
Diffstat (limited to 'src/Configuration.hpp')
-rw-r--r-- | src/Configuration.hpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/Configuration.hpp b/src/Configuration.hpp index 6a59076..770a240 100644 --- a/src/Configuration.hpp +++ b/src/Configuration.hpp @@ -63,6 +63,23 @@ public: } } + // Set a global configuration setting + template<class S> + void set_setting(S new_setting) + { + set<S>(new_setting.value); + } + + // Set a global port color setting + void set_setting(setting::PortColor new_setting) + { + auto& color = _port_colors[static_cast<unsigned>(new_setting.type)]; + + if (color != new_setting.color) { + set_port_color(new_setting.type, new_setting.color); + } + } + // Get a global configuration setting template<class S> const decltype(S::value) get() const |