Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EffectChain: name ControlObjects consistently with chain_preset #4456

Merged
merged 1 commit into from
Oct 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions src/effects/effectchain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,26 +101,32 @@ EffectChain::EffectChain(const QString& group,
&EffectChain::slotControlLoadedChainPresetRequest);

m_pControlNextChainPreset = std::make_unique<ControlPushButton>(
ConfigKey(m_group, "next_chain"));
ConfigKey(m_group, "next_chain_preset"));
connect(m_pControlNextChainPreset.get(),
&ControlObject::valueChanged,
this,
&EffectChain::slotControlNextChainPreset);
ControlDoublePrivate::insertAlias(ConfigKey(m_group, "next_chain"),
ConfigKey(m_group, "next_chain_preset"));

m_pControlPrevChainPreset = std::make_unique<ControlPushButton>(
ConfigKey(m_group, "prev_chain"));
ConfigKey(m_group, "prev_chain_preset"));
connect(m_pControlPrevChainPreset.get(),
&ControlObject::valueChanged,
this,
&EffectChain::slotControlPrevChainPreset);
ControlDoublePrivate::insertAlias(ConfigKey(m_group, "prev_chain"),
ConfigKey(m_group, "prev_chain_preset"));

// Ignoring no-ops is important since this is for +/- tickers.
m_pControlChainSelector = std::make_unique<ControlEncoder>(
ConfigKey(m_group, "chain_selector"), false);
connect(m_pControlChainSelector.get(),
m_pControlChainPresetSelector = std::make_unique<ControlEncoder>(
ConfigKey(m_group, "chain_preset_selector"), false);
connect(m_pControlChainPresetSelector.get(),
&ControlObject::valueChanged,
this,
&EffectChain::slotControlChainSelector);
&EffectChain::slotControlChainPresetSelector);
ControlDoublePrivate::insertAlias(ConfigKey(m_group, "chain_selector"),
ConfigKey(m_group, "chain_preset_preset"));

// ControlObjects for skin <-> controller mapping interaction.
// Refer to comment in header for full explanation.
Expand Down Expand Up @@ -316,7 +322,7 @@ void EffectChain::slotControlChainSuperParameter(double v, bool force) {
}
}

void EffectChain::slotControlChainSelector(double value) {
void EffectChain::slotControlChainPresetSelector(double value) {
int index = presetIndex();
if (value > 0) {
index++;
Expand Down
4 changes: 2 additions & 2 deletions src/effects/effectchain.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class EffectChain : public QObject {

private slots:
void slotControlLoadedChainPresetRequest(double value);
void slotControlChainSelector(double value);
void slotControlChainPresetSelector(double value);
void slotControlNextChainPreset(double value);
void slotControlPrevChainPreset(double value);
void slotChannelStatusChanged(double value, const ChannelHandleAndGroup& handleGroup);
Expand All @@ -136,7 +136,7 @@ class EffectChain : public QObject {
std::unique_ptr<ControlPushButton> m_pControlChainEnabled;
std::unique_ptr<ControlPushButton> m_pControlChainMixMode;
std::unique_ptr<ControlObject> m_pControlLoadedChainPreset;
std::unique_ptr<ControlEncoder> m_pControlChainSelector;
std::unique_ptr<ControlEncoder> m_pControlChainPresetSelector;
std::unique_ptr<ControlPushButton> m_pControlNextChainPreset;
std::unique_ptr<ControlPushButton> m_pControlPrevChainPreset;

Expand Down