Mercurial > hg > svgui
comparison layer/LayerFactory.cpp @ 11:2d5005f2b3d9
* Rework handling of layer properties in file I/O -- we now get the individual
layers to load and save them rather than doing it via generic property lists
in the base class, so as to ensure we read and write meaningful values rather
than generic int values requiring conversion.
author | Chris Cannam |
---|---|
date | Thu, 19 Jan 2006 12:54:38 +0000 |
parents | 06bba0b79b1c |
children | 0183ebb725ca |
comparison
equal
deleted
inserted
replaced
10:8f5b812baaee | 11:2d5005f2b3d9 |
---|---|
49 case MelodicRangeSpectrogram: | 49 case MelodicRangeSpectrogram: |
50 // The user can change all the parameters of this after the | 50 // The user can change all the parameters of this after the |
51 // fact -- there's nothing permanently melodic-range about it | 51 // fact -- there's nothing permanently melodic-range about it |
52 // that should be encoded in its name | 52 // that should be encoded in its name |
53 return Layer::tr("Spectrogram"); | 53 return Layer::tr("Spectrogram"); |
54 | |
55 default: break; | |
54 } | 56 } |
55 | 57 |
56 return Layer::tr("Layer"); | 58 return Layer::tr("Layer"); |
57 } | 59 } |
58 | 60 |
187 | 189 |
188 case MelodicRangeSpectrogram: | 190 case MelodicRangeSpectrogram: |
189 layer = new SpectrogramLayer(view, SpectrogramLayer::MelodicRange); | 191 layer = new SpectrogramLayer(view, SpectrogramLayer::MelodicRange); |
190 static_cast<SpectrogramLayer *>(layer)->setChannel(channel); | 192 static_cast<SpectrogramLayer *>(layer)->setChannel(channel); |
191 break; | 193 break; |
194 | |
195 default: break; | |
192 } | 196 } |
193 | 197 |
194 if (!layer) { | 198 if (!layer) { |
195 std::cerr << "LayerFactory::createLayer: Unknown layer type " | 199 std::cerr << "LayerFactory::createLayer: Unknown layer type " |
196 << type << std::endl; | 200 << type << std::endl; |