diff --git a/src/preferences/dialog/dlgprefeq.cpp b/src/preferences/dialog/dlgprefeq.cpp index 7709d33f7a7..4b6c3eb913b 100644 --- a/src/preferences/dialog/dlgprefeq.cpp +++ b/src/preferences/dialog/dlgprefeq.cpp @@ -21,7 +21,7 @@ const QString kEnableEqs = "EnableEQs"; const QString kEqsOnly = "EQsOnly"; const QString kSingleEq = "SingleEQEffect"; const QString kDefaultEqId = BiquadFullKillEQEffect::getId(); -const QString kDefaultMasterEqId = QString(); +const QString kDefaultMainEqId = QString(); const QString kDefaultQuickEffectId = FilterEffect::getId(); const int kFrequencyUpperLimit = 20050; @@ -80,7 +80,7 @@ DlgPrefEQ::DlgPrefEQ( m_pNumDecks->connectValueChanged(this, &DlgPrefEQ::slotNumDecksChanged); slotNumDecksChanged(m_pNumDecks->get()); - setUpMasterEQ(); + setUpMainEQ(); loadSettings(); slotUpdate(); @@ -180,7 +180,7 @@ static bool isMixingEQ(EffectManifest* pManifest) { return pManifest->isMixingEQ(); } -static bool isMasterEQ(EffectManifest* pManifest) { +static bool isMainEQ(EffectManifest* pManifest) { return pManifest->isMasterEQ(); } @@ -366,7 +366,7 @@ void DlgPrefEQ::setDefaultShelves() } void DlgPrefEQ::slotResetToDefaults() { - slotMasterEQToDefault(); + slotMainEQToDefault(); setDefaultShelves(); foreach(QComboBox* pCombo, m_deckEqEffectSelectors) { pCombo->setCurrentIndex( @@ -573,8 +573,8 @@ void DlgPrefEQ::slotUpdateLoEQ() { slotApply(); } -void DlgPrefEQ::slotUpdateMasterEQParameter(int value) { - EffectPointer effect(m_pEffectMasterEQ); +void DlgPrefEQ::slotUpdateMainEQParameter(int value) { + EffectPointer effect(m_pEffectMainEQ); if (!effect.isNull()) { QSlider* slider = qobject_cast(sender()); int index = slider->property("index").toInt(); @@ -661,35 +661,36 @@ void DlgPrefEQ::slotBypass(int state) { slotApply(); } -void DlgPrefEQ::setUpMasterEQ() { - connect(pbResetMasterEq, &QAbstractButton::clicked, this, &DlgPrefEQ::slotMasterEQToDefault); +void DlgPrefEQ::setUpMainEQ() { + connect(pbResetMainEq, &QAbstractButton::clicked, this, &DlgPrefEQ::slotMainEQToDefault); - connect(comboBoxMasterEq, + connect(comboBoxMainEq, QOverload::of(&QComboBox::currentIndexChanged), this, - &DlgPrefEQ::slotMasterEqEffectChanged); + &DlgPrefEQ::slotMainEqEffectChanged); QString configuredEffect = m_pConfig->getValue(ConfigKey(kConfigKey, - "EffectForGroup_[Master]"), kDefaultMasterEqId); + "EffectForGroup_[Master]"), + kDefaultMainEqId); - const QList availableMasterEQEffects = - m_pEffectsManager->getAvailableEffectManifestsFiltered(isMasterEQ); + const QList availableMainEQEffects = + m_pEffectsManager->getAvailableEffectManifestsFiltered(isMainEQ); - // Add empty item at the top: no Master EQ - comboBoxMasterEq->addItem(EffectsManager::kNoEffectString); - for (const auto& pManifest : availableMasterEQEffects) { - comboBoxMasterEq->addItem(pManifest->name(), QVariant(pManifest->id())); + // Add empty item at the top: no Main EQ + comboBoxMainEq->addItem(EffectsManager::kNoEffectString); + for (const auto& pManifest : availableMainEQEffects) { + comboBoxMainEq->addItem(pManifest->name(), QVariant(pManifest->id())); } - int masterEqIndex = comboBoxMasterEq->findData(configuredEffect); + int masterEqIndex = comboBoxMainEq->findData(configuredEffect); if (masterEqIndex < 0) { // Configured effect not in list, clear selection masterEqIndex = 0; } - comboBoxMasterEq->setCurrentIndex(masterEqIndex); + comboBoxMainEq->setCurrentIndex(masterEqIndex); // Load parameters from preferences: - EffectPointer effect(m_pEffectMasterEQ); + EffectPointer effect(m_pEffectMainEQ); if (!effect.isNull()) { int knobNum = effect->numKnobParameters(); for (int i = 0; i < knobNum; i++) { @@ -700,14 +701,14 @@ void DlgPrefEQ::setUpMasterEQ() { bool ok; double value = strValue.toDouble(&ok); if (ok) { - setMasterEQParameter(i, value); + setMainEQParameter(i, value); } } } } } -void DlgPrefEQ::slotMasterEqEffectChanged(int effectIndex) { +void DlgPrefEQ::slotMainEqEffectChanged(int effectIndex) { // clear parameters view first qDeleteAll(m_masterEQSliders); m_masterEQSliders.clear(); @@ -716,12 +717,12 @@ void DlgPrefEQ::slotMasterEqEffectChanged(int effectIndex) { qDeleteAll(m_masterEQLabels); m_masterEQLabels.clear(); - QString effectId = comboBoxMasterEq->itemData(effectIndex).toString(); + QString effectId = comboBoxMainEq->itemData(effectIndex).toString(); if (effectId.isNull()) { - pbResetMasterEq->hide(); + pbResetMainEq->hide(); } else { - pbResetMasterEq->show(); + pbResetMainEq->show(); } EffectChainSlotPointer pChainSlot = m_pOutputEffectRack->getEffectChainSlot(0); @@ -736,11 +737,11 @@ void DlgPrefEQ::slotMasterEqEffectChanged(int effectIndex) { if (pEffect) { pEffect->setEnabled(true); - m_pEffectMasterEQ = pEffect; + m_pEffectMainEQ = pEffect; int knobNum = pEffect->numKnobParameters(); - // Create and set up Master EQ's sliders + // Create and set up Main EQ's sliders int i; for (i = 0; i < knobNum; i++) { EffectParameter* param = pEffect->getKnobParameterForSlot(i); @@ -765,7 +766,7 @@ void DlgPrefEQ::slotMasterEqEffectChanged(int effectIndex) { connect(slider, &QAbstractSlider::sliderMoved, this, - &DlgPrefEQ::slotUpdateMasterEQParameter); + &DlgPrefEQ::slotUpdateMainEQParameter); QLabel* valueLabel = new QLabel(this); m_masterEQValues.append(valueLabel); @@ -831,22 +832,22 @@ QString DlgPrefEQ::getQuickEffectGroupForDeck(int deck) const { return QString(); } -void DlgPrefEQ::slotMasterEQToDefault() { - EffectPointer effect(m_pEffectMasterEQ); +void DlgPrefEQ::slotMainEQToDefault() { + EffectPointer effect(m_pEffectMainEQ); if (!effect.isNull()) { int knobNum = effect->numKnobParameters(); for (int i = 0; i < knobNum; i++) { EffectParameter* param = effect->getKnobParameterForSlot(i); if (param) { double defaultValue = param->getDefault(); - setMasterEQParameter(i, defaultValue); + setMainEQParameter(i, defaultValue); } } } } -void DlgPrefEQ::setMasterEQParameter(int i, double value) { - EffectPointer effect(m_pEffectMasterEQ); +void DlgPrefEQ::setMainEQParameter(int i, double value) { + EffectPointer effect(m_pEffectMainEQ); if (!effect.isNull()) { EffectParameter* param = effect->getKnobParameterForSlot(i); if (param) { diff --git a/src/preferences/dialog/dlgprefeq.h b/src/preferences/dialog/dlgprefeq.h index 4a63f386c93..7f32aa07ece 100644 --- a/src/preferences/dialog/dlgprefeq.h +++ b/src/preferences/dialog/dlgprefeq.h @@ -42,11 +42,11 @@ class DlgPrefEQ : public DlgPreferencePage, public Ui::DlgPrefEQDlg { void slotUpdateEqAutoReset(int); void slotUpdateGainAutoReset(int); void slotBypass(int state); - // Update the Master EQ - void slotUpdateMasterEQParameter(int value); - void slotMasterEQToDefault(); - void setMasterEQParameter(int i, double value); - void slotMasterEqEffectChanged(int effectIndex); + // Update the Main EQ + void slotUpdateMainEQParameter(int value); + void slotMainEQToDefault(); + void setMainEQParameter(int i, double value); + void slotMainEqEffectChanged(int effectIndex); signals: void apply(const QString &); @@ -59,7 +59,7 @@ class DlgPrefEQ : public DlgPreferencePage, public Ui::DlgPrefEQDlg { int getSliderPosition(double eqFreq, int minimum, int maximum); void validate_levels(); void updateBandFilter(int index, double value); - void setUpMasterEQ(); + void setUpMainEQ(); void applySelections(); ControlProxy m_COLoFreq; @@ -81,11 +81,11 @@ class DlgPrefEQ : public DlgPreferencePage, public Ui::DlgPrefEQDlg { bool m_inSlotPopulateDeckEffectSelectors; - // Members needed for the Master EQ + // Members needed for the Main EQ QList m_masterEQSliders; QList m_masterEQValues; QList m_masterEQLabels; - QWeakPointer m_pEffectMasterEQ; + QWeakPointer m_pEffectMainEQ; bool m_bEqAutoReset; bool m_bGainAutoReset; diff --git a/src/preferences/dialog/dlgprefeqdlg.ui b/src/preferences/dialog/dlgprefeqdlg.ui index 2f1cdef61cb..49874481f58 100644 --- a/src/preferences/dialog/dlgprefeqdlg.ui +++ b/src/preferences/dialog/dlgprefeqdlg.ui @@ -306,18 +306,18 @@ - + - Master EQ + Main EQ - + - + Reset Parameter @@ -423,10 +423,10 @@ Dynamically add Eq / Quick Effect comboboxes --> SliderHiEQ SliderLoEQ - comboBoxMasterEq - pbResetMasterEq + comboBoxMainEq + pbResetMainEq + Dynamically add Main EQ sliders --> CheckBoxEqAutoReset CheckBoxGainAutoReset CheckBoxBypass