comparison layer/SpectrogramLayer.cpp @ 82:82482231b6b1

* Add file open/save operations to main toolbar * Allow opening any sort of file from toolbar file open function * First cut at on-disc cacheing for decoded mp3/ogg files * Permit un-snapped selection by holding Shift
author Chris Cannam
date Thu, 27 Apr 2006 17:29:19 +0000
parents d99d67a5b93a
children d31c4f5230d7
comparison
equal deleted inserted replaced
81:b9f71b8ae21e 82:82482231b6b1
140 list.push_back(tr("Colour")); 140 list.push_back(tr("Colour"));
141 list.push_back(tr("Colour Scale")); 141 list.push_back(tr("Colour Scale"));
142 list.push_back(tr("Window Type")); 142 list.push_back(tr("Window Type"));
143 list.push_back(tr("Window Size")); 143 list.push_back(tr("Window Size"));
144 list.push_back(tr("Window Overlap")); 144 list.push_back(tr("Window Overlap"));
145 list.push_back(tr("Normalize")); 145 list.push_back(tr("Normalize Columns"));
146 list.push_back(tr("Bin Display")); 146 list.push_back(tr("Bin Display"));
147 list.push_back(tr("Threshold")); 147 list.push_back(tr("Threshold"));
148 list.push_back(tr("Gain")); 148 list.push_back(tr("Gain"));
149 list.push_back(tr("Colour Rotation")); 149 list.push_back(tr("Colour Rotation"));
150 list.push_back(tr("Min Frequency")); 150 list.push_back(tr("Min Frequency"));
156 Layer::PropertyType 156 Layer::PropertyType
157 SpectrogramLayer::getPropertyType(const PropertyName &name) const 157 SpectrogramLayer::getPropertyType(const PropertyName &name) const
158 { 158 {
159 if (name == tr("Gain")) return RangeProperty; 159 if (name == tr("Gain")) return RangeProperty;
160 if (name == tr("Colour Rotation")) return RangeProperty; 160 if (name == tr("Colour Rotation")) return RangeProperty;
161 if (name == tr("Normalize")) return ToggleProperty; 161 if (name == tr("Normalize Columns")) return ToggleProperty;
162 if (name == tr("Threshold")) return RangeProperty; 162 if (name == tr("Threshold")) return RangeProperty;
163 return ValueProperty; 163 return ValueProperty;
164 } 164 }
165 165
166 QString 166 QString
171 name == tr("Window Overlap")) return tr("Window"); 171 name == tr("Window Overlap")) return tr("Window");
172 if (name == tr("Colour") || 172 if (name == tr("Colour") ||
173 name == tr("Gain") || 173 name == tr("Gain") ||
174 name == tr("Threshold") || 174 name == tr("Threshold") ||
175 name == tr("Colour Rotation")) return tr("Colour"); 175 name == tr("Colour Rotation")) return tr("Colour");
176 if (name == tr("Normalize") || 176 if (name == tr("Normalize Columns") ||
177 name == tr("Bin Display") || 177 name == tr("Bin Display") ||
178 name == tr("Colour Scale")) return tr("Scale"); 178 name == tr("Colour Scale")) return tr("Scale");
179 if (name == tr("Max Frequency") || 179 if (name == tr("Max Frequency") ||
180 name == tr("Min Frequency") || 180 name == tr("Min Frequency") ||
181 name == tr("Frequency Scale") || 181 name == tr("Frequency Scale") ||
302 302
303 *min = 0; 303 *min = 0;
304 *max = 2; 304 *max = 2;
305 deft = (int)m_binDisplay; 305 deft = (int)m_binDisplay;
306 306
307 } else if (name == tr("Normalize")) { 307 } else if (name == tr("Normalize Columns")) {
308 308
309 deft = (m_normalizeColumns ? 1 : 0); 309 deft = (m_normalizeColumns ? 1 : 0);
310 310
311 } else { 311 } else {
312 deft = Layer::getPropertyRangeAndValue(name, min, max); 312 deft = Layer::getPropertyRangeAndValue(name, min, max);
488 default: 488 default:
489 case 0: setBinDisplay(AllBins); break; 489 case 0: setBinDisplay(AllBins); break;
490 case 1: setBinDisplay(PeakBins); break; 490 case 1: setBinDisplay(PeakBins); break;
491 case 2: setBinDisplay(PeakFrequencies); break; 491 case 2: setBinDisplay(PeakFrequencies); break;
492 } 492 }
493 } else if (name == "Normalize") { 493 } else if (name == "Normalize Columns") {
494 setNormalizeColumns(value ? true : false); 494 setNormalizeColumns(value ? true : false);
495 } 495 }
496 } 496 }
497 497
498 void 498 void