21#ifndef SAYONARA_PLAYER_SETTINGNOTIFIER_H
22#define SAYONARA_PLAYER_SETTINGNOTIFIER_H
36 void sigValueChanged();
39 template<
typename Listener>
40 void addListener(Listener* listener,
void (Listener::*fn)())
42 connect(
this, &AbstrSettingNotifier::sigValueChanged, listener, fn);
45 void emitValueChanged();
48template<
typename KeyClass>
67 m_settingNotifier->emitValueChanged();
71 void addListener(T* c,
void (T::*fn)())
73 m_settingNotifier->addListener(c, fn);
79 std::unique_ptr<AbstrSettingNotifier> m_settingNotifier {std::make_unique<AbstrSettingNotifier>()};
84 template<
typename KeyClass,
typename Listener>
85 void listen(Listener* t,
void (Listener::*fn)(),
const bool run =
true)
91 auto callable = std::bind(fn, t);
96 template<
typename KeyClass>
Definition: SettingNotifier.h:32
Definition: SettingNotifier.h:50