diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2017-04-17 16:33:45 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2017-04-17 16:33:58 +0200 |
commit | cbb0f0f34e71630cb59ac4a831daf445f58a6427 (patch) | |
tree | 1114dd2b50aa4a63832e595bec445170f6ba12fb /plugingui/humanizerframecontent.h | |
parent | febd5dec458e9fb066dab218b07d6c42b53ea5b1 (diff) |
Connect humanizer controls to settings.
Diffstat (limited to 'plugingui/humanizerframecontent.h')
-rw-r--r-- | plugingui/humanizerframecontent.h | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/plugingui/humanizerframecontent.h b/plugingui/humanizerframecontent.h index 0196ea5..f6895dd 100644 --- a/plugingui/humanizerframecontent.h +++ b/plugingui/humanizerframecontent.h @@ -33,14 +33,19 @@ #include <iomanip> #include <sstream> +struct Settings; +class SettingsNotifier; + namespace GUI { // TODO move this to an own file? -class LabeledControl : public Widget +class LabeledControl + : public Widget { public: - LabeledControl(Widget* parent, const std::string& name) : Widget(parent) + LabeledControl(Widget* parent, const std::string& name) + : Widget(parent) { layout.setResizeChildren(false); layout.setHAlignment(HAlignment::center); @@ -76,19 +81,28 @@ private: } }; -class HumanizerframeContent : public Widget +class HumanizerframeContent + : public Widget { public: - HumanizerframeContent(Widget* parent); + HumanizerframeContent(Widget* parent, + Settings& settings, + SettingsNotifier& settings_notifier); private: + void attackValueChanged(float value); + void falloffValueChanged(float value); + HBoxLayout layout{this}; LabeledControl attack{this, "Attack"}; LabeledControl falloff{this, "Release"}; - Knob attackKnob{&attack}; - Knob falloffKnob{&falloff}; + Knob attack_knob{&attack}; + Knob falloff_knob{&falloff}; + + Settings& settings; + SettingsNotifier& settings_notifier; }; } // GUI:: |