From 7f7f5446e459b308fef6b37d09137e38aa190971 Mon Sep 17 00:00:00 2001 From: Michael Gregorius Date: Thu, 7 Sep 2023 13:32:51 +0200 Subject: [PATCH] Fix build Fix the build by adjusting the enums. I added the changes while writing the commit message for the merge commit but they did not make it. --- plugins/LadspaEffect/LadspaMatrixControlDialog.cpp | 6 +++--- plugins/LadspaEffect/LadspaWidgetFactory.cpp | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/plugins/LadspaEffect/LadspaMatrixControlDialog.cpp b/plugins/LadspaEffect/LadspaMatrixControlDialog.cpp index bcb48009d..a1836e8e3 100644 --- a/plugins/LadspaEffect/LadspaMatrixControlDialog.cpp +++ b/plugins/LadspaEffect/LadspaMatrixControlDialog.cpp @@ -73,7 +73,7 @@ LadspaMatrixControlDialog::LadspaMatrixControlDialog(LadspaControls * ladspaCont { mainLayout->addSpacing(3); - m_stereoLink = new LedCheckBox(tr("Link Channels"), this, QString(), LedCheckBox::Green, false); + m_stereoLink = new LedCheckBox(tr("Link Channels"), this, QString(), LedCheckBox::LedColor::Green, false); m_stereoLink->setModel(&ladspaControls->m_stereoLinkModel); mainLayout->addWidget(m_stereoLink, 0, Qt::AlignCenter); } @@ -156,7 +156,7 @@ void LadspaMatrixControlDialog::arrangeControls(QWidget * parent, QGridLayout* g if (i == 0 && ladspaControl->m_link) { // TODO Assumes that all processors are equal! Change to more general approach, e.g. map from name to row - LedCheckBox * linkCheckBox = new LedCheckBox("", parent, "", LedCheckBox::Green); + LedCheckBox * linkCheckBox = new LedCheckBox("", parent, "", LedCheckBox::LedColor::Green); linkCheckBox->setModel(&ladspaControl->m_linkEnabledModel); linkCheckBox->setToolTip(tr("Link channels")); gridLayout->addWidget(linkCheckBox, currentRow, linkColumn, Qt::AlignHCenter); @@ -168,7 +168,7 @@ void LadspaMatrixControlDialog::arrangeControls(QWidget * parent, QGridLayout* g { // Align time based controls, i.e. knobs, in the center. // This defeats the purpose of the widget factory a bit but it makes the design look nicer. - auto alignment = ladspaControl->port()->data_type == TIME ? Qt::AlignCenter : Qt::Alignment(); + auto alignment = ladspaControl->port()->data_type == BufferDataType::Time ? Qt::AlignCenter : Qt::Alignment(); gridLayout->addWidget(controlWidget, currentRow, currentChannelColumn, alignment); } diff --git a/plugins/LadspaEffect/LadspaWidgetFactory.cpp b/plugins/LadspaEffect/LadspaWidgetFactory.cpp index 22785fa19..b09a061d1 100644 --- a/plugins/LadspaEffect/LadspaWidgetFactory.cpp +++ b/plugins/LadspaEffect/LadspaWidgetFactory.cpp @@ -52,21 +52,21 @@ QWidget * LadspaWidgetFactory::createWidget(LadspaControl * ladspaControl, QWidg switch (port->data_type) { - case TOGGLED: + case BufferDataType::Toggled: { LedCheckBox * toggle = new LedCheckBox( - name, parent, QString(), LedCheckBox::Green, false); + name, parent, QString(), LedCheckBox::LedColor::Green, false); toggle->setModel(ladspaControl->toggledModel()); return toggle; } - case INTEGER: - case ENUM: - case FLOATING: + case BufferDataType::Integer: + case BufferDataType::Enum: + case BufferDataType::Floating: return new BarModelEditor(name, ladspaControl->knobModel(), parent); - case TIME: - knob = new TempoSyncKnob(knobBright_26, parent, name); + case BufferDataType::Time: + knob = new TempoSyncKnob(KnobType::Bright26, parent, name); knob->setModel(ladspaControl->tempoSyncKnobModel()); knob->setLabel(name); break;