Mercurial > hg > svgui
comparison 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 |
comparison
equal
deleted
inserted
replaced
166:48182241f594 | 167:53b9c7656798 |
---|---|
18 | 18 |
19 #include "base/PropertyContainer.h" | 19 #include "base/PropertyContainer.h" |
20 #include "base/PlayParameters.h" | 20 #include "base/PlayParameters.h" |
21 #include "layer/Layer.h" | 21 #include "layer/Layer.h" |
22 #include "base/UnitDatabase.h" | 22 #include "base/UnitDatabase.h" |
23 #include "base/RangeMapper.h" | |
23 | 24 |
24 #include "plugin/RealTimePluginFactory.h" | 25 #include "plugin/RealTimePluginFactory.h" |
25 #include "plugin/RealTimePluginInstance.h" | 26 #include "plugin/RealTimePluginInstance.h" |
26 #include "plugin/PluginXml.h" | 27 #include "plugin/PluginXml.h" |
27 | 28 |
180 gainDial->setFixedWidth(24); | 181 gainDial->setFixedWidth(24); |
181 gainDial->setFixedHeight(24); | 182 gainDial->setFixedHeight(24); |
182 gainDial->setNotchesVisible(false); | 183 gainDial->setNotchesVisible(false); |
183 gainDial->setToolTip(tr("Playback Level")); | 184 gainDial->setToolTip(tr("Playback Level")); |
184 gainDial->setDefaultValue(0); | 185 gainDial->setDefaultValue(0); |
186 gainDial->setObjectName(tr("Playback Level")); | |
187 gainDial->setRangeMapper(new LinearRangeMapper | |
188 (-50, 50, -25, 25, tr("dB"))); | |
185 connect(gainDial, SIGNAL(valueChanged(int)), | 189 connect(gainDial, SIGNAL(valueChanged(int)), |
186 this, SLOT(playGainDialChanged(int))); | 190 this, SLOT(playGainDialChanged(int))); |
187 connect(params, SIGNAL(playGainChanged(float)), | 191 connect(params, SIGNAL(playGainChanged(float)), |
188 this, SLOT(playGainChanged(float))); | 192 this, SLOT(playGainChanged(float))); |
189 connect(this, SIGNAL(changePlayGain(float)), | 193 connect(this, SIGNAL(changePlayGain(float)), |
201 panDial->setFixedWidth(24); | 205 panDial->setFixedWidth(24); |
202 panDial->setFixedHeight(24); | 206 panDial->setFixedHeight(24); |
203 panDial->setNotchesVisible(false); | 207 panDial->setNotchesVisible(false); |
204 panDial->setToolTip(tr("Playback Pan / Balance")); | 208 panDial->setToolTip(tr("Playback Pan / Balance")); |
205 panDial->setDefaultValue(0); | 209 panDial->setDefaultValue(0); |
210 gainDial->setObjectName(tr("Playback Pan / Balance")); | |
206 connect(panDial, SIGNAL(valueChanged(int)), | 211 connect(panDial, SIGNAL(valueChanged(int)), |
207 this, SLOT(playPanDialChanged(int))); | 212 this, SLOT(playPanDialChanged(int))); |
208 connect(params, SIGNAL(playPanChanged(float)), | 213 connect(params, SIGNAL(playPanChanged(float)), |
209 this, SLOT(playPanChanged(float))); | 214 this, SLOT(playPanChanged(float))); |
210 connect(this, SIGNAL(changePlayPan(float)), | 215 connect(this, SIGNAL(changePlayPan(float)), |
316 dial->setMinimum(min); | 321 dial->setMinimum(min); |
317 dial->setMaximum(max); | 322 dial->setMaximum(max); |
318 dial->setPageStep(1); | 323 dial->setPageStep(1); |
319 dial->setNotchesVisible((max - min) <= 12); | 324 dial->setNotchesVisible((max - min) <= 12); |
320 dial->setDefaultValue(value); | 325 dial->setDefaultValue(value); |
326 dial->setRangeMapper(m_container->getNewPropertyRangeMapper(name)); | |
321 connect(dial, SIGNAL(valueChanged(int)), | 327 connect(dial, SIGNAL(valueChanged(int)), |
322 this, SLOT(propertyControllerChanged(int))); | 328 this, SLOT(propertyControllerChanged(int))); |
323 | 329 |
324 if (inGroup) { | 330 if (inGroup) { |
325 dial->setFixedWidth(24); | 331 dial->setFixedWidth(24); |