svgui  1.9
LayerFactory Class Reference

#include <LayerFactory.h>

Collaboration diagram for LayerFactory:

Public Types

enum  LayerType {
  Waveform, Spectrogram, TimeRuler, TimeInstants,
  TimeValues, Notes, FlexiNotes, Regions,
  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)
 
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 LayerFactorygetInstance ()
 

Protected Member Functions

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

Static Protected Attributes

static LayerFactorym_instance = new LayerFactory
 

Detailed Description

Definition at line 26 of file LayerFactory.h.

Member Typedef Documentation

◆ LayerTypeSet

Definition at line 58 of file LayerFactory.h.

Member Enumeration Documentation

◆ LayerType

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.

Constructor & Destructor Documentation

◆ ~LayerFactory()

LayerFactory::~LayerFactory ( )
virtual

Definition at line 64 of file LayerFactory.cpp.

Member Function Documentation

◆ getInstance()

◆ getValidLayerTypes()

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

◆ getValidEmptyLayerTypes()

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.

◆ getLayerType()

◆ createLayer()

◆ setLayerDefaultProperties()

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

Definition at line 490 of file LayerFactory.cpp.

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

Referenced by createLayer().

◆ getLayerPresentationName()

◆ isLayerSliceable()

bool LayerFactory::isLayerSliceable ( const Layer layer)

!! We can create slices of spectrograms, but there's a

Definition at line 104 of file LayerFactory.cpp.

◆ setModel()

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

Definition at line 300 of file LayerFactory.cpp.

◆ createEmptyModel()

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

Definition at line 353 of file LayerFactory.cpp.

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

◆ getChannel()

int LayerFactory::getChannel ( Layer layer)

Definition at line 375 of file LayerFactory.cpp.

◆ setChannel()

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

Definition at line 387 of file LayerFactory.cpp.

◆ getLayerIconName()

◆ getLayerTypeName()

◆ getLayerTypeForName()

LayerFactory::LayerType LayerFactory::getLayerTypeForName ( QString  name)

◆ getLayerTypeForClipboardContents()

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

Definition at line 541 of file LayerFactory.cpp.

References Notes, Regions, TimeInstants, and TimeValues.

◆ trySetModel()

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

Definition at line 86 of file LayerFactory.h.

Member Data Documentation

◆ m_instance

LayerFactory * LayerFactory::m_instance = new LayerFactory
staticprotected

Definition at line 95 of file LayerFactory.h.

Referenced by getInstance().


The documentation for this class was generated from the following files: