summaryrefslogtreecommitdiff
path: root/plugingui
diff options
context:
space:
mode:
Diffstat (limited to 'plugingui')
-rw-r--r--plugingui/sampleselectionframecontent.cc22
-rw-r--r--plugingui/sampleselectionframecontent.h6
2 files changed, 27 insertions, 1 deletions
diff --git a/plugingui/sampleselectionframecontent.cc b/plugingui/sampleselectionframecontent.cc
index 61b816f..448eca5 100644
--- a/plugingui/sampleselectionframecontent.cc
+++ b/plugingui/sampleselectionframecontent.cc
@@ -63,9 +63,17 @@ SampleselectionframeContent::SampleselectionframeContent(dggui::Widget* parent,
f_random.setControl(&f_random_knob);
layout.addItem(&f_random);
+ f_position.resize(80, 80);
+ f_position_knob.resize(30, 30);
+ f_position_knob.showValue(false);
+ f_position_knob.setDefaultValue(Settings::sample_selection_f_position_default);
+ f_position.setControl(&f_position_knob);
+ layout.addItem(&f_position);
+
layout.setPosition(&f_close, dggui::GridLayout::GridRange{0, 1, 0, 1});
layout.setPosition(&f_diverse, dggui::GridLayout::GridRange{1, 2, 0, 1});
layout.setPosition(&f_random, dggui::GridLayout::GridRange{2, 3, 0, 1});
+ layout.setPosition(&f_position, dggui::GridLayout::GridRange{3, 4, 0, 1});
CONNECT(this, settings_notifier.sample_selection_f_close,
this, &SampleselectionframeContent::fCloseSettingsValueChanged);
@@ -73,6 +81,8 @@ SampleselectionframeContent::SampleselectionframeContent(dggui::Widget* parent,
this, &SampleselectionframeContent::fDiverseSettingsValueChanged);
CONNECT(this, settings_notifier.sample_selection_f_random,
this, &SampleselectionframeContent::fRandomSettingsValueChanged);
+ CONNECT(this, settings_notifier.sample_selection_f_position,
+ this, &SampleselectionframeContent::fPositionSettingsValueChanged);
CONNECT(&f_close_knob, valueChangedNotifier,
this, &SampleselectionframeContent::fCloseKnobValueChanged);
@@ -80,6 +90,8 @@ SampleselectionframeContent::SampleselectionframeContent(dggui::Widget* parent,
this, &SampleselectionframeContent::fDiverseKnobValueChanged);
CONNECT(&f_random_knob, valueChangedNotifier,
this, &SampleselectionframeContent::fRandomKnobValueChanged);
+ CONNECT(&f_position_knob, valueChangedNotifier,
+ this, &SampleselectionframeContent::fPositionKnobValueChanged);
}
void SampleselectionframeContent::fCloseKnobValueChanged(float value)
@@ -97,6 +109,11 @@ void SampleselectionframeContent::fRandomKnobValueChanged(float value)
settings.sample_selection_f_random.store(value);
}
+void SampleselectionframeContent::fPositionKnobValueChanged(float value)
+{
+ settings.sample_selection_f_position.store(value);
+}
+
void SampleselectionframeContent::fCloseSettingsValueChanged(float value)
{
f_close_knob.setValue(value);
@@ -112,4 +129,9 @@ void SampleselectionframeContent::fRandomSettingsValueChanged(float value)
f_random_knob.setValue(value);
}
+void SampleselectionframeContent::fPositionSettingsValueChanged(float value)
+{
+ f_position_knob.setValue(value);
+}
+
} // GUI::
diff --git a/plugingui/sampleselectionframecontent.h b/plugingui/sampleselectionframecontent.h
index ab1be04..d3834f6 100644
--- a/plugingui/sampleselectionframecontent.h
+++ b/plugingui/sampleselectionframecontent.h
@@ -52,20 +52,24 @@ private:
void fCloseKnobValueChanged(float value);
void fDiverseKnobValueChanged(float value);
void fRandomKnobValueChanged(float value);
+ void fPositionKnobValueChanged(float value);
void fCloseSettingsValueChanged(float value);
void fDiverseSettingsValueChanged(float value);
void fRandomSettingsValueChanged(float value);
+ void fPositionSettingsValueChanged(float value);
- dggui::GridLayout layout{this, 3, 1};
+ dggui::GridLayout layout{this, 4, 1};
LabeledControl f_close{this, _("pClose")};
LabeledControl f_diverse{this, _("pDiverse")};
LabeledControl f_random{this, _("pRandom")};
+ LabeledControl f_position{this, _("pPosition")};
dggui::Knob f_close_knob{&f_close};
dggui::Knob f_diverse_knob{&f_diverse};
dggui::Knob f_random_knob{&f_random};
+ dggui::Knob f_position_knob{&f_position};
Settings& settings;
SettingsNotifier& settings_notifier;