|
svgui
1.9
|
#include <LayerFactory.h>

Public Types | |
| enum | LayerType { Waveform, Spectrogram, TimeRuler, TimeInstants, TimeValues, Notes, FlexiNotes, Regions, Text, Image, Colour3DPlot, Spectrum, Slice, MelodicRangeSpectrogram, PeakFrequencySpectrogram, UnknownLayer = 255 } |
| typedef std::set< LayerType > | LayerTypeSet |
Public Member Functions | |
| virtual | ~LayerFactory () |
| LayerTypeSet | getValidLayerTypes (Model *model) |
| LayerTypeSet | getValidEmptyLayerTypes () |
| LayerType | getLayerType (const Layer *) |
| Layer * | createLayer (LayerType type) |
| void | setLayerDefaultProperties (LayerType type, Layer *layer) |
| QString | getLayerPresentationName (LayerType type) |
| bool | isLayerSliceable (const Layer *) |
| void | setModel (Layer *layer, Model *model) |
| Model * | createEmptyModel (LayerType type, Model *baseModel) |
| int | getChannel (Layer *layer) |
| void | setChannel (Layer *layer, int channel) |
| QString | getLayerIconName (LayerType) |
| QString | getLayerTypeName (LayerType) |
| LayerType | getLayerTypeForName (QString) |
| LayerType | getLayerTypeForClipboardContents (const Clipboard &) |
Static Public Member Functions | |
| static LayerFactory * | getInstance () |
Protected Member Functions | |
| template<typename LayerClass , typename ModelClass > | |
| bool | trySetModel (Layer *layerBase, Model *modelBase) |
Static Protected Attributes | |
| static LayerFactory * | m_instance = new LayerFactory |
Definition at line 26 of file LayerFactory.h.
| typedef std::set<LayerType> LayerFactory::LayerTypeSet |
Definition at line 58 of file LayerFactory.h.
| Enumerator | |
|---|---|
| Waveform | |
| Spectrogram | |
| TimeRuler | |
| TimeInstants | |
| TimeValues | |
| Notes | |
| FlexiNotes | |
| Regions | |
| Text | |
| Image | |
| Colour3DPlot | |
| Spectrum | |
| Slice | |
| MelodicRangeSpectrogram | |
| PeakFrequencySpectrogram | |
| UnknownLayer | |
Definition at line 29 of file LayerFactory.h.
|
virtual |
Definition at line 64 of file LayerFactory.cpp.
|
static |
Definition at line 59 of file LayerFactory.cpp.
References m_instance.
Referenced by TimeRulerLayer::getLayerPresentationName(), Layer::getLayerPresentationName(), Layer::getPropertyContainerIconName(), Pane::getTopFlexiNoteLayer(), PropertyStack::repopulate(), Layer::toBriefXml(), Layer::toXml(), and CSVFormatDialog::updateModelLabel().
| LayerFactory::LayerTypeSet LayerFactory::getValidLayerTypes | ( | Model * | model | ) |
Definition at line 137 of file LayerFactory.cpp.
References Colour3DPlot, FlexiNotes, Image, MelodicRangeSpectrogram, Notes, PeakFrequencySpectrogram, Regions, Slice, Spectrogram, Spectrum, Text, TimeInstants, TimeValues, and Waveform.
| LayerFactory::LayerTypeSet LayerFactory::getValidEmptyLayerTypes | ( | ) |
!! and in principle Colour3DPlot – now that's a challenge
Definition at line 196 of file LayerFactory.cpp.
References FlexiNotes, Image, Notes, Regions, Text, TimeInstants, and TimeValues.
| LayerFactory::LayerType LayerFactory::getLayerType | ( | const Layer * | layer | ) |
Definition at line 211 of file LayerFactory.cpp.
References Colour3DPlot, FlexiNotes, Image, Notes, Regions, Slice, Spectrogram, Spectrum, Text, TimeInstants, TimeRuler, TimeValues, UnknownLayer, and Waveform.
Referenced by TimeRulerLayer::getLayerPresentationName(), Layer::getLayerPresentationName(), and Pane::getTopFlexiNoteLayer().
Definition at line 404 of file LayerFactory.cpp.
References Colour3DPlot, FlexiNotes, getLayerPresentationName(), Image, SpectrogramLayer::MelodicPeaks, SpectrogramLayer::MelodicRange, MelodicRangeSpectrogram, Notes, PeakFrequencySpectrogram, Regions, setLayerDefaultProperties(), Layer::setObjectName(), Slice, Spectrogram, Spectrum, Text, TimeInstants, TimeRuler, TimeValues, UnknownLayer, and Waveform.
Definition at line 490 of file LayerFactory.cpp.
References getLayerTypeName(), and Layer::setProperties().
Referenced by createLayer().
| QString LayerFactory::getLayerPresentationName | ( | LayerType | type | ) |
Definition at line 69 of file LayerFactory.cpp.
References Colour3DPlot, FlexiNotes, Image, MelodicRangeSpectrogram, Notes, PeakFrequencySpectrogram, Regions, Slice, Spectrogram, Spectrum, Text, TimeInstants, TimeRuler, TimeValues, UnknownLayer, and Waveform.
Referenced by createLayer(), TimeRulerLayer::getLayerPresentationName(), Layer::getLayerPresentationName(), PropertyStack::repopulate(), and CSVFormatDialog::updateModelLabel().
| bool LayerFactory::isLayerSliceable | ( | const Layer * | layer | ) |
!! We can create slices of spectrograms, but there's a
Definition at line 104 of file LayerFactory.cpp.
| void LayerFactory::setModel | ( | Layer * | layer, |
| Model * | model | ||
| ) |
Definition at line 300 of file LayerFactory.cpp.
| Model * LayerFactory::createEmptyModel | ( | LayerType | type, |
| Model * | baseModel | ||
| ) |
Definition at line 353 of file LayerFactory.cpp.
References FlexiNotes, Image, Notes, Regions, Text, TimeInstants, and TimeValues.
| int LayerFactory::getChannel | ( | Layer * | layer | ) |
Definition at line 375 of file LayerFactory.cpp.
| void LayerFactory::setChannel | ( | Layer * | layer, |
| int | channel | ||
| ) |
Definition at line 387 of file LayerFactory.cpp.
| QString LayerFactory::getLayerIconName | ( | LayerType | type | ) |
Definition at line 230 of file LayerFactory.cpp.
References Colour3DPlot, FlexiNotes, Image, MelodicRangeSpectrogram, Notes, PeakFrequencySpectrogram, Regions, Slice, Spectrogram, Spectrum, Text, TimeInstants, TimeRuler, TimeValues, UnknownLayer, and Waveform.
Referenced by Layer::getPropertyContainerIconName().
| QString LayerFactory::getLayerTypeName | ( | LayerType | type | ) |
Definition at line 256 of file LayerFactory.cpp.
References Colour3DPlot, FlexiNotes, Image, MelodicRangeSpectrogram, Notes, PeakFrequencySpectrogram, Regions, Slice, Spectrogram, Spectrum, Text, TimeInstants, TimeRuler, TimeValues, UnknownLayer, and Waveform.
Referenced by setLayerDefaultProperties().
| LayerFactory::LayerType LayerFactory::getLayerTypeForName | ( | QString | name | ) |
Definition at line 282 of file LayerFactory.cpp.
References Colour3DPlot, FlexiNotes, Image, Regions, Slice, Spectrogram, Spectrum, Text, TimeInstants, TimeRuler, TimeValues, UnknownLayer, and Waveform.
| LayerFactory::LayerType LayerFactory::getLayerTypeForClipboardContents | ( | const Clipboard & | clip | ) |
Definition at line 541 of file LayerFactory.cpp.
References Notes, Regions, TimeInstants, and TimeValues.
|
inlineprotected |
Definition at line 86 of file LayerFactory.h.
|
staticprotected |
Definition at line 95 of file LayerFactory.h.
Referenced by getInstance().