Mercurial > hg > svgui
diff widgets/PropertyBox.cpp @ 167:53b9c7656798
* Use RangeMappers in various places in plugin parameters, layer properties,
playback parameters &c
author | Chris Cannam |
---|---|
date | Mon, 16 Oct 2006 20:42:23 +0000 |
parents | dd6dd983e8ef |
children | d4be66d61c04 |
line wrap: on
line diff
--- a/widgets/PropertyBox.cpp Mon Oct 16 13:13:57 2006 +0000 +++ b/widgets/PropertyBox.cpp Mon Oct 16 20:42:23 2006 +0000 @@ -20,6 +20,7 @@ #include "base/PlayParameters.h" #include "layer/Layer.h" #include "base/UnitDatabase.h" +#include "base/RangeMapper.h" #include "plugin/RealTimePluginFactory.h" #include "plugin/RealTimePluginInstance.h" @@ -182,6 +183,9 @@ gainDial->setNotchesVisible(false); gainDial->setToolTip(tr("Playback Level")); gainDial->setDefaultValue(0); + gainDial->setObjectName(tr("Playback Level")); + gainDial->setRangeMapper(new LinearRangeMapper + (-50, 50, -25, 25, tr("dB"))); connect(gainDial, SIGNAL(valueChanged(int)), this, SLOT(playGainDialChanged(int))); connect(params, SIGNAL(playGainChanged(float)), @@ -203,6 +207,7 @@ panDial->setNotchesVisible(false); panDial->setToolTip(tr("Playback Pan / Balance")); panDial->setDefaultValue(0); + gainDial->setObjectName(tr("Playback Pan / Balance")); connect(panDial, SIGNAL(valueChanged(int)), this, SLOT(playPanDialChanged(int))); connect(params, SIGNAL(playPanChanged(float)), @@ -318,6 +323,7 @@ dial->setPageStep(1); dial->setNotchesVisible((max - min) <= 12); dial->setDefaultValue(value); + dial->setRangeMapper(m_container->getNewPropertyRangeMapper(name)); connect(dial, SIGNAL(valueChanged(int)), this, SLOT(propertyControllerChanged(int)));