summaryrefslogtreecommitdiff
path: root/plugingui/maintab.cc
diff options
context:
space:
mode:
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::