LayerFactory Class Reference

#include <LayerFactory.h>

Collaboration diagram for LayerFactory:

Collaboration graph
[legend]
List of all members.

Detailed Description

Definition at line 26 of file LayerFactory.h.

Public Types

enum  LayerType {
  Waveform, Spectrogram, TimeRuler, TimeInstants,
  TimeValues, Notes, Text, Image,
  Colour3DPlot, Spectrum, Slice, MelodicRangeSpectrogram,
  PeakFrequencySpectrogram, UnknownLayer = 255
}
typedef std::set< LayerTypeLayerTypeSet

Public Member Functions

virtual ~LayerFactory ()
LayerTypeSet getValidLayerTypes (Model *model)
LayerTypeSet getValidEmptyLayerTypes ()
LayerType getLayerType (const Layer *)
LayercreateLayer (LayerType type)
void setLayerDefaultProperties (LayerType type, Layer *layer)
QString getLayerPresentationName (LayerType type)
bool isLayerSliceable (const Layer *)
void setModel (Layer *layer, Model *model)
ModelcreateEmptyModel (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 LayerFactorygetInstance ()

Protected Member Functions

template<typename LayerClass, typename ModelClass>
bool trySetModel (Layer *layerBase, Model *modelBase)

Static Protected Attributes

static LayerFactorym_instance


Member Typedef Documentation

typedef std::set<LayerType> LayerFactory::LayerTypeSet

Definition at line 56 of file LayerFactory.h.


Member Enumeration Documentation

enum LayerFactory::LayerType

Enumerator:
Waveform 
Spectrogram 
TimeRuler 
TimeInstants 
TimeValues 
Notes 
Text 
Image 
Colour3DPlot 
Spectrum 
Slice 
MelodicRangeSpectrogram 
PeakFrequencySpectrogram 
UnknownLayer 

Definition at line 29 of file LayerFactory.h.


Constructor & Destructor Documentation

LayerFactory::~LayerFactory (  )  [virtual]

Definition at line 60 of file LayerFactory.cpp.


Member Function Documentation

LayerFactory * LayerFactory::getInstance (  )  [static]

Definition at line 55 of file LayerFactory.cpp.

References m_instance.

Referenced by MainWindow::addLayer(), Document::createDerivedLayer(), Document::createEmptyLayer(), Document::createImportedLayer(), Document::createLayer(), MainWindow::currentPaneChanged(), TimeRulerLayer::getLayerPresentationName(), Layer::getLayerPresentationName(), Layer::getPropertyContainerIconName(), MainWindow::handleOSCMessage(), MainWindowBase::paste(), SVFileReader::readLayer(), PropertyStack::repopulate(), Document::setChannel(), Document::setMainModel(), Document::setModel(), MainWindow::setupExistingLayersMenus(), MainWindow::setupPaneAndLayerMenus(), Layer::toBriefXml(), and Layer::toXml().

LayerFactory::LayerTypeSet LayerFactory::getValidLayerTypes ( Model model  ) 

Definition at line 130 of file LayerFactory.cpp.

References Colour3DPlot, Image, MelodicRangeSpectrogram, Notes, PeakFrequencySpectrogram, Slice, Spectrogram, Spectrum, Text, TimeInstants, TimeValues, and Waveform.

Referenced by Document::createDerivedLayer(), and Document::createImportedLayer().

LayerFactory::LayerTypeSet LayerFactory::getValidEmptyLayerTypes (  ) 

Definition at line 180 of file LayerFactory.cpp.

References Image, Notes, Text, TimeInstants, and TimeValues.

Referenced by MainWindow::addLayer(), and MainWindow::setupPaneAndLayerMenus().

LayerFactory::LayerType LayerFactory::getLayerType ( const Layer  ) 

Definition at line 193 of file LayerFactory.cpp.

References Colour3DPlot, Image, Notes, Slice, Spectrogram, Spectrum, Text, TimeInstants, TimeRuler, TimeValues, UnknownLayer, and Waveform.

Referenced by TimeRulerLayer::getLayerPresentationName(), Layer::getLayerPresentationName(), and MainWindow::setupExistingLayersMenus().

Layer * LayerFactory::createLayer ( LayerType  type  ) 

Definition at line 362 of file LayerFactory.cpp.

References Colour3DPlot, getLayerPresentationName(), Image, SpectrogramLayer::MelodicPeaks, SpectrogramLayer::MelodicRange, MelodicRangeSpectrogram, Notes, PeakFrequencySpectrogram, setLayerDefaultProperties(), Layer::setObjectName(), Slice, Spectrogram, Spectrum, Text, TimeInstants, TimeRuler, TimeValues, and Waveform.

Referenced by Document::createImportedLayer(), and Document::createLayer().

void LayerFactory::setLayerDefaultProperties ( LayerType  type,
Layer layer 
)

Definition at line 437 of file LayerFactory.cpp.

References getLayerTypeName(), Layer::setProperties(), and XmlExportable::toXmlString().

Referenced by createLayer().

QString LayerFactory::getLayerPresentationName ( LayerType  type  ) 

Definition at line 65 of file LayerFactory.cpp.

References Colour3DPlot, Image, MelodicRangeSpectrogram, Notes, PeakFrequencySpectrogram, Slice, Spectrogram, Spectrum, Text, TimeInstants, TimeRuler, TimeValues, and Waveform.

Referenced by createLayer(), TimeRulerLayer::getLayerPresentationName(), Layer::getLayerPresentationName(), PropertyStack::repopulate(), and MainWindow::setupPaneAndLayerMenus().

bool LayerFactory::isLayerSliceable ( const Layer  ) 

Definition at line 97 of file LayerFactory.cpp.

Referenced by MainWindow::setupExistingLayersMenus().

void LayerFactory::setModel ( Layer layer,
Model model 
)

Definition at line 269 of file LayerFactory.cpp.

Referenced by Document::setMainModel(), and Document::setModel().

Model * LayerFactory::createEmptyModel ( LayerType  type,
Model baseModel 
)

Definition at line 315 of file LayerFactory.cpp.

References Model::getSampleRate(), Image, Notes, Text, TimeInstants, and TimeValues.

Referenced by Document::createEmptyLayer().

int LayerFactory::getChannel ( Layer layer  ) 

Definition at line 333 of file LayerFactory.cpp.

void LayerFactory::setChannel ( Layer layer,
int  channel 
)

Definition at line 345 of file LayerFactory.cpp.

Referenced by Document::setChannel().

QString LayerFactory::getLayerIconName ( LayerType   ) 

Definition at line 210 of file LayerFactory.cpp.

References Colour3DPlot, Image, MelodicRangeSpectrogram, Notes, PeakFrequencySpectrogram, Slice, Spectrogram, Spectrum, Text, TimeInstants, TimeRuler, TimeValues, and Waveform.

Referenced by Layer::getPropertyContainerIconName(), and MainWindow::setupExistingLayersMenus().

QString LayerFactory::getLayerTypeName ( LayerType   ) 

Definition at line 231 of file LayerFactory.cpp.

References Colour3DPlot, Image, MelodicRangeSpectrogram, Notes, PeakFrequencySpectrogram, Slice, Spectrogram, Spectrum, Text, TimeInstants, TimeRuler, TimeValues, and Waveform.

Referenced by setLayerDefaultProperties().

LayerFactory::LayerType LayerFactory::getLayerTypeForName ( QString   ) 

Definition at line 252 of file LayerFactory.cpp.

References Colour3DPlot, Image, Notes, Slice, Spectrogram, Spectrum, Text, TimeInstants, TimeRuler, TimeValues, UnknownLayer, and Waveform.

Referenced by MainWindow::handleOSCMessage().

LayerFactory::LayerType LayerFactory::getLayerTypeForClipboardContents ( const Clipboard  ) 

Definition at line 488 of file LayerFactory.cpp.

References Clipboard::getPoints(), Notes, TimeInstants, and TimeValues.

Referenced by MainWindowBase::paste().

template<typename LayerClass, typename ModelClass>
bool LayerFactory::trySetModel ( Layer layerBase,
Model modelBase 
) [inline, protected]

Definition at line 84 of file LayerFactory.h.


Member Data Documentation

LayerFactory * LayerFactory::m_instance [static, protected]

Definition at line 93 of file LayerFactory.h.

Referenced by getInstance().


The documentation for this class was generated from the following files:
Generated on Wed Feb 20 15:45:33 2008 for SonicVisualiser by  doxygen 1.5.1