aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2011-03-02 20:26:55 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2011-03-02 20:26:55 +0000
commit3ba644457343b3a24bb260e53f8fb608c624580d (patch)
tree1563c8d1e80644c70d4b3f79f094ea06e72a0920 /src
parentffef9491700965c061f4bdb7dd61c125d2eb2bf9 (diff)
downloadqmmp-3ba644457343b3a24bb260e53f8fb608c624580d.tar.gz
qmmp-3ba644457343b3a24bb260e53f8fb608c624580d.tar.bz2
qmmp-3ba644457343b3a24bb260e53f8fb608c624580d.zip
ladspa plugin: added support for read-only options
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@2080 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src')
-rw-r--r--src/plugins/Effect/ladspa/ladspahost.cpp5
-rw-r--r--src/plugins/Effect/ladspa/ladspahost.h5
-rw-r--r--src/plugins/Effect/ladspa/settingsdialog.cpp8
3 files changed, 15 insertions, 3 deletions
diff --git a/src/plugins/Effect/ladspa/ladspahost.cpp b/src/plugins/Effect/ladspa/ladspahost.cpp
index 4dcbd8440..29500e349 100644
--- a/src/plugins/Effect/ladspa/ladspahost.cpp
+++ b/src/plugins/Effect/ladspa/ladspahost.cpp
@@ -539,7 +539,10 @@ void LADSPAHost::initialize(LADSPAEffect *instance)
start = min * 0.5f + max * 0.5f;
instance->knobs[k] = start;
- c->type = LADSPAControl::SLIDER;
+ if(LADSPA_IS_PORT_OUTPUT(plugin->PortDescriptors[k]))
+ c->type = LADSPAControl::LABEL;
+ else
+ c->type = LADSPAControl::SLIDER;
c->min = min;
c->max = max;
c->step = step;
diff --git a/src/plugins/Effect/ladspa/ladspahost.h b/src/plugins/Effect/ladspa/ladspahost.h
index 9d65f0f49..1fb7af373 100644
--- a/src/plugins/Effect/ladspa/ladspahost.h
+++ b/src/plugins/Effect/ladspa/ladspahost.h
@@ -51,13 +51,14 @@ public:
enum Type
{
BUTTON = 0,
- SLIDER
+ SLIDER,
+ LABEL
};
double min;
double max;
double step;
LADSPA_Data *value;
- bool type;
+ int type;
QString name;
};
diff --git a/src/plugins/Effect/ladspa/settingsdialog.cpp b/src/plugins/Effect/ladspa/settingsdialog.cpp
index a78fa8c5a..95a989069 100644
--- a/src/plugins/Effect/ladspa/settingsdialog.cpp
+++ b/src/plugins/Effect/ladspa/settingsdialog.cpp
@@ -98,6 +98,7 @@ void SettingsDialog::on_configureButton_clicked()
QFormLayout *formLayout = new QFormLayout(dialog);
LADSPAButton *button = 0;
LADSPASlider *slider = 0;
+ QLabel *label = 0;
foreach(LADSPAControl *c, effect->controls)
{
@@ -111,6 +112,13 @@ void SettingsDialog::on_configureButton_clicked()
case LADSPAControl::SLIDER:
slider = new LADSPASlider(c->min, c->max, c->step, c->value, dialog);
formLayout->addRow(c->name, slider);
+ break;
+ case LADSPAControl::LABEL:
+ label = new QLabel(this);
+ label->setText(QString("%1").arg(*c->value));
+ label->setFrameStyle(QFrame::StyledPanel);
+ label->setFrameShadow(QFrame::Sunken);
+ formLayout->addRow(c->name, label);
}
}
if (effect->controls.isEmpty())