summaryrefslogtreecommitdiff
path: root/plugingui/maintab.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2017-04-17 16:33:45 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2017-04-17 16:33:58 +0200
commitcbb0f0f34e71630cb59ac4a831daf445f58a6427 (patch)
tree1114dd2b50aa4a63832e595bec445170f6ba12fb /plugingui/maintab.cc
parentfebd5dec458e9fb066dab218b07d6c42b53ea5b1 (diff)
Connect humanizer controls to settings.
Diffstat (limited to 'plugingui/maintab.cc')
-rw-r--r--plugingui/maintab.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/plugingui/maintab.cc b/plugingui/maintab.cc
index bed26ba..3e5a816 100644
--- a/plugingui/maintab.cc
+++ b/plugingui/maintab.cc
@@ -34,6 +34,9 @@ MainTab::MainTab(Widget* parent,
SettingsNotifier& settings_notifier)
: Widget(parent)
, drumkitframe_content{this, settings, settings_notifier}
+ , humanizerframe_content{this, settings, settings_notifier}
+ , settings(settings)
+ , settings_notifier(settings_notifier)
{
layout.setSpacing(0);
layout.setResizeChildren(true);
@@ -65,6 +68,17 @@ MainTab::MainTab(Widget* parent,
status_frame.setContent(&statusframe_content);
humanizer_frame.setContent(&humanizerframe_content);
diskstreaming_frame.setContent(&diskstreamingframe_content);
+
+ CONNECT(this, settings_notifier.enable_velocity_modifier,
+ &humanizer_frame, &FrameWidget::setOnSwitch);
+
+ CONNECT(&humanizer_frame, onSwitchChangeNotifier,
+ this, &MainTab::humanizerOnChange);
+}
+
+void MainTab::humanizerOnChange(bool on)
+{
+ settings.enable_velocity_modifier.store(on);
}
} // GUI::