21 #ifndef SETTINGNOTIFIER_H 22 #define SETTINGNOTIFIER_H 24 #include "Utils/Logger/Logger.h" 25 #include "Utils/Settings/SayonaraClass.h" 26 #include "Utils/Settings/SettingKey.h" 38 void sig_value_changed();
42 void add_listener(T* c,
void (T::*fn)())
44 connect(
this, &AbstrSettingNotifier::sig_value_changed, c, fn);
48 template<
typename KeyClass>
72 emit sig_value_changed();
80 template<
typename KeyClassInstance,
typename T>
83 listen(T* t,
void (T::*fn)(),
bool run=
true)
89 auto callable = std::bind(fn, t);
94 template<
typename KeyClassInstance>
102 #endif // SETTINGNOTIFIER_H Definition: SettingNotifier.h:33
Definition: SettingNotifier.h:49
Set namespace defines the setting: Which key and which type.
Definition: SettingKey.h:230