Mercurial > hg > svgui
comparison layer/WaveformLayer.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 | 9e6b3e239b9d |
children | 42118892f428 |
comparison
equal
deleted
inserted
replaced
166:48182241f594 | 167:53b9c7656798 |
---|---|
16 #include "WaveformLayer.h" | 16 #include "WaveformLayer.h" |
17 | 17 |
18 #include "base/AudioLevel.h" | 18 #include "base/AudioLevel.h" |
19 #include "view/View.h" | 19 #include "view/View.h" |
20 #include "base/Profiler.h" | 20 #include "base/Profiler.h" |
21 #include "base/RangeMapper.h" | |
21 | 22 |
22 #include <QPainter> | 23 #include <QPainter> |
23 #include <QPixmap> | 24 #include <QPixmap> |
24 | 25 |
25 #include <iostream> | 26 #include <iostream> |
220 case 1: return tr("Mean"); | 221 case 1: return tr("Mean"); |
221 case 2: return tr("Butterfly"); | 222 case 2: return tr("Butterfly"); |
222 } | 223 } |
223 } | 224 } |
224 return tr("<unknown>"); | 225 return tr("<unknown>"); |
226 } | |
227 | |
228 RangeMapper * | |
229 WaveformLayer::getNewPropertyRangeMapper(const PropertyName &name) const | |
230 { | |
231 if (name == "Gain") { | |
232 return new LinearRangeMapper(-50, 50, -25, 25, tr("dB")); | |
233 } | |
234 return 0; | |
225 } | 235 } |
226 | 236 |
227 void | 237 void |
228 WaveformLayer::setProperty(const PropertyName &name, int value) | 238 WaveformLayer::setProperty(const PropertyName &name, int value) |
229 { | 239 { |