svcore  1.9
FlexiNoteModel Class Reference

#include <FlexiNoteModel.h>

Inheritance diagram for FlexiNoteModel:
Collaboration diagram for FlexiNoteModel:

Public Types

typedef FlexiNote Point
 
typedef std::multiset< FlexiNote, typename FlexiNote ::OrderComparator > PointList
 
typedef PointList::iterator PointListIterator
 
typedef PointList::const_iterator PointListConstIterator
 
enum  { SortRole = Qt::UserRole }
 
enum  SortType { SortNumeric, SortAlphabetical }
 

Public Slots

void aboutToDelete ()
 
void sourceModelAboutToBeDeleted ()
 

Signals

void modelChanged ()
 Emitted when a model has been edited (or more data retrieved from cache, in the case of a cached model that generates slowly) More...
 
void modelChangedWithin (int startFrame, int endFrame)
 Emitted when a model has been edited (or more data retrieved from cache, in the case of a cached model that generates slowly) More...
 
void completionChanged ()
 Emitted when some internal processing has advanced a stage, but the model has not changed externally. More...
 
void ready ()
 Emitted when internal processing is complete (i.e. More...
 
void alignmentCompletionChanged ()
 Emitted when the completion percentage changes for the calculation of this model's alignment model. More...
 
void aboutToBeDeleted ()
 Emitted when something notifies this model (through calling aboutToDelete() that it is about to delete it. More...
 

Public Member Functions

 FlexiNoteModel (int sampleRate, int resolution, bool notifyOnAdd=true)
 
 FlexiNoteModel (int sampleRate, int resolution, float valueMinimum, float valueMaximum, bool notifyOnAdd=true)
 
virtual ~FlexiNoteModel ()
 
float getValueQuantization () const
 
void setValueQuantization (float q)
 
float getValueMinimum () const
 
float getValueMaximum () const
 
QString getTypeName () const
 Return the type of the model. More...
 
virtual bool canPlay () const
 
virtual QString getDefaultPlayClipId () const
 
virtual void toXml (QTextStream &out, QString indent="", QString extraAttributes="") const
 Stream this exportable object out to XML on a text stream. More...
 
virtual int getColumnCount () const
 TabularModel methods. More...
 
virtual QString getHeading (int column) const
 
virtual QVariant getData (int row, int column, int role) const
 TabularModel methods. More...
 
virtual CommandgetSetDataCommand (int row, int column, const QVariant &value, int role)
 
virtual SortType getSortType (int column) const
 
NoteList getNotes () const
 NoteExportable methods. More...
 
NoteList getNotesWithin (int startFrame, int endFrame) const
 
virtual SparseValueModel< FlexiNote >::PointList getPoints (long start, long end) const
 PointTypes have a duration, so this returns all points that span any of the given range (as well as the usual additional few before and after). More...
 
virtual SparseValueModel< FlexiNote >::PointList getPoints (long frame) const
 PointTypes have a duration, so this returns all points that span the given frame. More...
 
virtual const SparseModel< FlexiNote >::PointListgetPoints () const
 Get all points. More...
 
virtual bool isColumnTimeValue (int column) const
 
virtual QString getScaleUnits () const
 
virtual void setScaleUnits (QString units)
 
virtual void addPoint (const FlexiNote &point)
 Add a point. More...
 
virtual void deletePoint (const FlexiNote &point)
 Remove a point. More...
 
virtual bool isOK () const
 Return true if the model was constructed successfully. More...
 
virtual int getStartFrame () const
 Return the first audio frame spanned by the model. More...
 
virtual int getEndFrame () const
 Return the last audio frame spanned by the model. More...
 
virtual int getSampleRate () const
 Return the frame rate in frames per second. More...
 
virtual Modelclone () const
 Return a copy of this model. More...
 
virtual int getResolution () const
 
virtual void setResolution (int resolution)
 
virtual bool isEmpty () const
 Return whether the model is empty or not. More...
 
virtual int getPointCount () const
 Get the total number of points in the model. More...
 
virtual PointList getPreviousPoints (long frame) const
 Return all points that share the nearest frame number prior to the given one at which there are any points. More...
 
virtual PointList getNextPoints (long frame) const
 Return all points that share the nearest frame number subsequent to the given one at which there are any points. More...
 
virtual void clear ()
 Remove all points. More...
 
virtual bool isReady (int *completion=0) const
 Return true if the model has finished loading or calculating all its data, for a model that is capable of calculating in a background thread. More...
 
virtual void setCompletion (int completion, bool update=true)
 
virtual int getCompletion () const
 
virtual bool hasTextLabels () const
 
virtual QString getXmlOutputType () const
 
virtual QString toDelimitedDataString (QString delimiter) const
 
virtual QString toDelimitedDataStringSubset (QString delimiter, int f0, int f1) const
 
virtual int getRowCount () const
 TabularModel methods. More...
 
virtual long getFrameForRow (int row) const
 
virtual int getRowForFrame (long frame) const
 
virtual CommandgetInsertRowCommand (int row)
 
virtual CommandgetRemoveRowCommand (int row)
 
virtual int getNativeRate () const
 Return the frame rate of the underlying material, if the model itself has already been resampled. More...
 
virtual QString getTitle () const
 Return the "work title" of the model, if known. More...
 
virtual QString getMaker () const
 Return the "artist" or "maker" of the model, if known. More...
 
virtual QString getLocation () const
 Return the location of the data in this model (e.g. More...
 
virtual void abandon ()
 Mark the model as abandoning. More...
 
virtual bool isAbandoning () const
 Query whether the model has been marked as abandoning. More...
 
virtual const ZoomConstraintgetZoomConstraint () const
 If this model imposes a zoom constraint, i.e. More...
 
virtual ModelgetSourceModel () const
 If this model was derived from another, return the model it was derived from. More...
 
virtual void setSourceModel (Model *model)
 Set the source model for this model. More...
 
virtual void setAlignment (AlignmentModel *alignment)
 Specify an aligment between this model's timeline and that of a reference model. More...
 
virtual const AlignmentModelgetAlignment () const
 Retrieve the alignment model for this model. More...
 
virtual const ModelgetAlignmentReference () const
 Return the reference model for the current alignment timeline, if any. More...
 
virtual int alignToReference (int frame) const
 Return the frame number of the reference model that corresponds to the given frame number in this model. More...
 
virtual int alignFromReference (int referenceFrame) const
 Return the frame number in this model that corresponds to the given frame number of the reference model. More...
 
virtual int getAlignmentCompletion () const
 Return the completion percentage for the alignment model: 100 if there is no alignment model or it has been entirely calculated, or less than 100 if it is still being calculated. More...
 
void setRDFTypeURI (QString uri)
 Set the event, feature, or signal type URI for the features contained in this model, according to the Audio Features RDF ontology. More...
 
QString getRDFTypeURI () const
 Retrieve the event, feature, or signal type URI for the features contained in this model, if previously set with setRDFTypeURI. More...
 
virtual QString toXmlString (QString indent="", QString extraAttributes="") const
 Convert this exportable object to XML in a string. More...
 
virtual bool getDefaultPlayAudible () const
 
virtual bool isEditable () const
 

Static Public Member Functions

static QString encodeEntities (QString)
 
static QString encodeColour (int r, int g, int b)
 
static int getObjectExportId (const void *)
 

Static Public Attributes

static const int COMPLETION_UNKNOWN = -1
 

Protected Member Functions

void getPointIterators (long frame, PointListIterator &startItr, PointListIterator &endItr)
 
void getPointIterators (long frame, PointListConstIterator &startItr, PointListConstIterator &endItr) const
 
void rebuildRowVector () const
 
PointListIterator getPointListIteratorForRow (int row)
 
PointListConstIterator getPointListIteratorForRow (int row) const
 

Protected Attributes

float m_valueQuantization
 
float m_valueMinimum
 
float m_valueMaximum
 
bool m_haveExtents
 
QString m_units
 
int m_sampleRate
 
int m_resolution
 
bool m_notifyOnAdd
 
long m_sinceLastNotifyMin
 
long m_sinceLastNotifyMax
 
bool m_hasTextLabels
 
PointList m_points
 
int m_pointCount
 
QMutex m_mutex
 
int m_completion
 
std::vector< long > m_rows
 
Modelm_sourceModel
 
AlignmentModelm_alignment
 
QString m_typeUri
 
bool m_abandoning
 
bool m_aboutToDelete
 

Detailed Description

Definition at line 100 of file FlexiNoteModel.h.

Member Typedef Documentation

◆ Point

typedef FlexiNote SparseModel< FlexiNote >::Point
inherited

Definition at line 67 of file SparseModel.h.

◆ PointList

typedef std::multiset<FlexiNote , typename FlexiNote ::OrderComparator> SparseModel< FlexiNote >::PointList
inherited

Definition at line 69 of file SparseModel.h.

◆ PointListIterator

typedef PointList::iterator SparseModel< FlexiNote >::PointListIterator
inherited

Definition at line 70 of file SparseModel.h.

◆ PointListConstIterator

typedef PointList::const_iterator SparseModel< FlexiNote >::PointListConstIterator
inherited

Definition at line 71 of file SparseModel.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
inherited
Enumerator
SortRole 

Definition at line 44 of file TabularModel.h.

◆ SortType

enum TabularModel::SortType
inherited
Enumerator
SortNumeric 
SortAlphabetical 

Definition at line 45 of file TabularModel.h.

Constructor & Destructor Documentation

◆ FlexiNoteModel() [1/2]

FlexiNoteModel::FlexiNoteModel ( int  sampleRate,
int  resolution,
bool  notifyOnAdd = true 
)
inline

◆ FlexiNoteModel() [2/2]

FlexiNoteModel::FlexiNoteModel ( int  sampleRate,
int  resolution,
float  valueMinimum,
float  valueMaximum,
bool  notifyOnAdd = true 
)
inline

◆ ~FlexiNoteModel()

virtual FlexiNoteModel::~FlexiNoteModel ( )
inlinevirtual

Member Function Documentation

◆ getValueQuantization()

float FlexiNoteModel::getValueQuantization ( ) const
inline

Definition at line 129 of file FlexiNoteModel.h.

References m_valueQuantization.

◆ setValueQuantization()

void FlexiNoteModel::setValueQuantization ( float  q)
inline

Definition at line 130 of file FlexiNoteModel.h.

References m_valueQuantization.

◆ getValueMinimum()

float FlexiNoteModel::getValueMinimum ( ) const
inlinevirtual

Reimplemented from SparseValueModel< FlexiNote >.

Definition at line 131 of file FlexiNoteModel.h.

◆ getValueMaximum()

float FlexiNoteModel::getValueMaximum ( ) const
inlinevirtual

Reimplemented from SparseValueModel< FlexiNote >.

Definition at line 132 of file FlexiNoteModel.h.

◆ getTypeName()

QString FlexiNoteModel::getTypeName ( ) const
inlinevirtual

Return the type of the model.

For display purposes only.

Implements Model.

Definition at line 134 of file FlexiNoteModel.h.

◆ canPlay()

virtual bool FlexiNoteModel::canPlay ( ) const
inlinevirtual

Reimplemented from Playable.

Definition at line 136 of file FlexiNoteModel.h.

◆ getDefaultPlayClipId()

virtual QString FlexiNoteModel::getDefaultPlayClipId ( ) const
inlinevirtual

Reimplemented from Playable.

Definition at line 138 of file FlexiNoteModel.h.

◆ toXml()

virtual void FlexiNoteModel::toXml ( QTextStream &  stream,
QString  indent = "",
QString  extraAttributes = "" 
) const
inlinevirtual

Stream this exportable object out to XML on a text stream.

Reimplemented from SparseValueModel< FlexiNote >.

Definition at line 143 of file FlexiNoteModel.h.

References m_valueQuantization, and SparseValueModel< PointType >::toXml().

◆ getColumnCount()

virtual int FlexiNoteModel::getColumnCount ( ) const
inlinevirtual

TabularModel methods.

Reimplemented from SparseModel< FlexiNote >.

Definition at line 161 of file FlexiNoteModel.h.

◆ getHeading()

virtual QString FlexiNoteModel::getHeading ( int  column) const
inlinevirtual

Implements TabularModel.

Definition at line 166 of file FlexiNoteModel.h.

◆ getData()

virtual QVariant FlexiNoteModel::getData ( int  row,
int  column,
int  role 
) const
inlinevirtual

◆ getSetDataCommand()

virtual Command* FlexiNoteModel::getSetDataCommand ( int  row,
int  column,
const QVariant &  value,
int  role 
)
inlinevirtual

◆ getSortType()

virtual SortType FlexiNoteModel::getSortType ( int  column) const
inlinevirtual

Implements TabularModel.

Definition at line 219 of file FlexiNoteModel.h.

References TabularModel::SortAlphabetical, and TabularModel::SortNumeric.

◆ getNotes()

NoteList FlexiNoteModel::getNotes ( ) const
inlinevirtual

◆ getNotesWithin()

◆ getPoints() [1/3]

SparseValueModel< FlexiNote >::PointList IntervalModel< FlexiNote >::getPoints ( long  start,
long  end 
) const
virtualinherited

PointTypes have a duration, so this returns all points that span any of the given range (as well as the usual additional few before and after).

Consequently this can be very slow (optimised data structures still to be done!).

Reimplemented from SparseModel< FlexiNote >.

Definition at line 128 of file IntervalModel.h.

◆ getPoints() [2/3]

SparseValueModel< FlexiNote >::PointList IntervalModel< FlexiNote >::getPoints ( long  frame) const
virtualinherited

PointTypes have a duration, so this returns all points that span the given frame.

Consequently this can be very slow (optimised data structures still to be done!).

Reimplemented from SparseModel< FlexiNote >.

Definition at line 162 of file IntervalModel.h.

◆ getPoints() [3/3]

virtual const SparseModel<FlexiNote >::PointList& IntervalModel< FlexiNote >::getPoints ( ) const
inlinevirtualinherited

Get all points.

Reimplemented from SparseModel< FlexiNote >.

Definition at line 60 of file IntervalModel.h.

◆ isColumnTimeValue()

virtual bool IntervalModel< FlexiNote >::isColumnTimeValue ( int  column) const
inlinevirtualinherited

Implements TabularModel.

Definition at line 118 of file IntervalModel.h.

◆ getScaleUnits()

virtual QString SparseValueModel< FlexiNote >::getScaleUnits ( ) const
inlinevirtualinherited

Definition at line 61 of file SparseValueModel.h.

◆ setScaleUnits()

virtual void SparseValueModel< FlexiNote >::setScaleUnits ( QString  units)
inlinevirtualinherited

Definition at line 62 of file SparseValueModel.h.

◆ addPoint()

virtual void SparseValueModel< FlexiNote >::addPoint ( const FlexiNote point)
inlinevirtualinherited

Add a point.

Reimplemented from SparseModel< FlexiNote >.

Definition at line 67 of file SparseValueModel.h.

◆ deletePoint()

virtual void SparseValueModel< FlexiNote >::deletePoint ( const FlexiNote point)
inlinevirtualinherited

Remove a point.

Points are not necessarily unique, so this function will remove the first point that compares equal to the supplied one using Point::Comparator. Other identical points may remain in the model.

Reimplemented from SparseModel< FlexiNote >.

Definition at line 87 of file SparseValueModel.h.

◆ isOK()

virtual bool SparseModel< FlexiNote >::isOK ( ) const
inlinevirtualinherited

Return true if the model was constructed successfully.

Classes that refer to the model should always test this before use.

Implements Model.

Definition at line 50 of file SparseModel.h.

◆ getStartFrame()

int SparseModel< FlexiNote >::getStartFrame ( ) const
virtualinherited

Return the first audio frame spanned by the model.

Implements Model.

Definition at line 484 of file SparseModel.h.

◆ getEndFrame()

int SparseModel< FlexiNote >::getEndFrame ( ) const
virtualinherited

Return the last audio frame spanned by the model.

Implements Model.

Definition at line 496 of file SparseModel.h.

◆ getSampleRate()

virtual int SparseModel< FlexiNote >::getSampleRate ( ) const
inlinevirtualinherited

Return the frame rate in frames per second.

Implements Model.

Definition at line 53 of file SparseModel.h.

◆ clone()

Model * SparseModel< FlexiNote >::clone ( ) const
virtualinherited

Return a copy of this model.

If the model is not editable, this may be effectively a shallow copy. If the model is editable, however, this operation must properly copy all of the model's editable data.

In general this operation is not useful for non-editable dense models such as waveforms, because there may be no efficient copy operation implemented – for such models it is better not to copy at all.

Caller owns the returned value.

!! is this ever used?

Implements Model.

Definition at line 509 of file SparseModel.h.

◆ getResolution()

virtual int SparseModel< FlexiNote >::getResolution ( ) const
inlinevirtualinherited

Definition at line 62 of file SparseModel.h.

◆ setResolution()

void SparseModel< FlexiNote >::setResolution ( int  resolution)
virtualinherited

Definition at line 679 of file SparseModel.h.

◆ isEmpty()

bool SparseModel< FlexiNote >::isEmpty ( ) const
virtualinherited

Return whether the model is empty or not.

Definition at line 523 of file SparseModel.h.

◆ getPointCount()

int SparseModel< FlexiNote >::getPointCount ( ) const
virtualinherited

Get the total number of points in the model.

Definition at line 530 of file SparseModel.h.

◆ getPreviousPoints()

SparseModel< FlexiNote >::PointList SparseModel< FlexiNote >::getPreviousPoints ( long  frame) const
virtualinherited

Return all points that share the nearest frame number prior to the given one at which there are any points.

Definition at line 635 of file SparseModel.h.

◆ getNextPoints()

SparseModel< FlexiNote >::PointList SparseModel< FlexiNote >::getNextPoints ( long  frame) const
virtualinherited

Return all points that share the nearest frame number subsequent to the given one at which there are any points.

Definition at line 658 of file SparseModel.h.

◆ clear()

void SparseModel< FlexiNote >::clear ( )
virtualinherited

Remove all points.

Definition at line 691 of file SparseModel.h.

◆ isReady()

virtual bool SparseModel< FlexiNote >::isReady ( int *  completion = 0) const
inlinevirtualinherited

Return true if the model has finished loading or calculating all its data, for a model that is capable of calculating in a background thread.

The default implementation is appropriate for a thread that does not background any work but carries out all its calculation from the constructor or accessors.

If "completion" is non-NULL, this function should return through it an estimated percentage value showing how far through the background operation it thinks it is (for progress reporting). If it has no way to calculate progress, it may return the special value COMPLETION_UNKNOWN.

Reimplemented from Model.

Definition at line 132 of file SparseModel.h.

◆ setCompletion()

void SparseModel< FlexiNote >::setCompletion ( int  completion,
bool  update = true 
)
virtualinherited

!! inefficient

!! inefficient

Definition at line 761 of file SparseModel.h.

◆ getCompletion()

virtual int SparseModel< FlexiNote >::getCompletion ( ) const
inlinevirtualinherited

Definition at line 139 of file SparseModel.h.

◆ hasTextLabels()

virtual bool SparseModel< FlexiNote >::hasTextLabels ( ) const
inlinevirtualinherited

Definition at line 141 of file SparseModel.h.

◆ getXmlOutputType()

virtual QString SparseModel< FlexiNote >::getXmlOutputType ( ) const
inlinevirtualinherited

Definition at line 145 of file SparseModel.h.

◆ toDelimitedDataString()

virtual QString SparseModel< FlexiNote >::toDelimitedDataString ( QString  delimiter) const
inlinevirtualinherited

Reimplemented from Model.

Definition at line 151 of file SparseModel.h.

◆ toDelimitedDataStringSubset()

virtual QString SparseModel< FlexiNote >::toDelimitedDataStringSubset ( QString  delimiter,
int  f0,
int  f1 
) const
inlinevirtualinherited

Reimplemented from Model.

Definition at line 160 of file SparseModel.h.

◆ getRowCount()

virtual int SparseModel< FlexiNote >::getRowCount ( ) const
inlinevirtualinherited

TabularModel methods.

Implements TabularModel.

Definition at line 285 of file SparseModel.h.

◆ getFrameForRow()

virtual long SparseModel< FlexiNote >::getFrameForRow ( int  row) const
inlinevirtualinherited

Implements TabularModel.

Definition at line 290 of file SparseModel.h.

◆ getRowForFrame()

virtual int SparseModel< FlexiNote >::getRowForFrame ( long  frame) const
inlinevirtualinherited

Implements TabularModel.

Definition at line 297 of file SparseModel.h.

◆ getInsertRowCommand()

virtual Command* SparseModel< FlexiNote >::getInsertRowCommand ( int  row)
inlinevirtualinherited

Reimplemented from TabularModel.

Definition at line 353 of file SparseModel.h.

◆ getRemoveRowCommand()

virtual Command* SparseModel< FlexiNote >::getRemoveRowCommand ( int  row)
inlinevirtualinherited

Reimplemented from TabularModel.

Definition at line 364 of file SparseModel.h.

◆ getPointIterators() [1/2]

void SparseModel< FlexiNote >::getPointIterators ( long  frame,
PointListIterator startItr,
PointListIterator endItr 
)
protectedinherited

Definition at line 586 of file SparseModel.h.

◆ getPointIterators() [2/2]

void SparseModel< FlexiNote >::getPointIterators ( long  frame,
PointListConstIterator startItr,
PointListConstIterator endItr 
) const
protectedinherited

Definition at line 609 of file SparseModel.h.

◆ rebuildRowVector()

void SparseModel< FlexiNote >::rebuildRowVector ( ) const
inlineprotectedinherited

Definition at line 396 of file SparseModel.h.

◆ getPointListIteratorForRow() [1/2]

PointListIterator SparseModel< FlexiNote >::getPointListIteratorForRow ( int  row)
inlineprotectedinherited

Definition at line 405 of file SparseModel.h.

◆ getPointListIteratorForRow() [2/2]

PointListConstIterator SparseModel< FlexiNote >::getPointListIteratorForRow ( int  row) const
inlineprotectedinherited

Definition at line 432 of file SparseModel.h.

◆ getNativeRate()

virtual int Model::getNativeRate ( ) const
inlinevirtualinherited

Return the frame rate of the underlying material, if the model itself has already been resampled.

Reimplemented in WaveFileModel.

Definition at line 69 of file Model.h.

References Model::getSampleRate().

◆ getTitle()

QString Model::getTitle ( ) const
virtualinherited

Return the "work title" of the model, if known.

Reimplemented in WaveFileModel.

Definition at line 153 of file Model.cpp.

References Model::getTitle(), and Model::m_sourceModel.

Referenced by Model::getTitle().

◆ getMaker()

QString Model::getMaker ( ) const
virtualinherited

Return the "artist" or "maker" of the model, if known.

Reimplemented in WaveFileModel.

Definition at line 160 of file Model.cpp.

References Model::getMaker(), and Model::m_sourceModel.

Referenced by Model::getMaker().

◆ getLocation()

QString Model::getLocation ( ) const
virtualinherited

Return the location of the data in this model (e.g.

source URL). This should not normally be returned for editable models that have been edited.

Reimplemented in WaveFileModel.

Definition at line 167 of file Model.cpp.

References Model::getLocation(), and Model::m_sourceModel.

Referenced by Model::getLocation().

◆ abandon()

virtual void Model::abandon ( )
inlinevirtualinherited

Mark the model as abandoning.

This means that the application no longer needs it, so it can stop doing any background calculations it may be involved in. Note that as far as the model API is concerned, this does nothing more than tell the model to return true from isAbandoning(). The actual response to this will depend on the model's context – it's possible nothing at all will change.

Definition at line 118 of file Model.h.

References Model::m_abandoning.

◆ isAbandoning()

virtual bool Model::isAbandoning ( ) const
inlinevirtualinherited

Query whether the model has been marked as abandoning.

Definition at line 125 of file Model.h.

References Model::m_abandoning.

Referenced by FeatureExtractionModelTransformer::setCompletion().

◆ getZoomConstraint()

virtual const ZoomConstraint* Model::getZoomConstraint ( ) const
inlinevirtualinherited

If this model imposes a zoom constraint, i.e.

some limit to the set of resolutions at which its data can meaningfully be displayed, then return it.

Reimplemented in AggregateWaveModel, WritableWaveFileModel, AlignmentModel, and WaveFileModel.

Definition at line 154 of file Model.h.

◆ getSourceModel()

virtual Model* Model::getSourceModel ( ) const
inlinevirtualinherited

If this model was derived from another, return the model it was derived from.

The assumption is that the source model's alignment will also apply to this model, unless some other property (such as a specific alignment model set on this model) indicates otherwise.

Definition at line 165 of file Model.h.

References Model::m_sourceModel.

◆ setSourceModel()

void Model::setSourceModel ( Model model)
virtualinherited

◆ setAlignment()

void Model::setAlignment ( AlignmentModel alignment)
virtualinherited

Specify an aligment between this model's timeline and that of a reference model.

The alignment model records both the reference and the alignment. This model takes ownership of the alignment model.

Definition at line 82 of file Model.cpp.

References Model::aboutToDelete(), Model::alignmentCompletionChanged(), Model::completionChanged(), and Model::m_alignment.

◆ getAlignment()

const AlignmentModel * Model::getAlignment ( ) const
virtualinherited

Retrieve the alignment model for this model.

This is not a generally useful function, as the alignment you really want may be performed by the source model instead. You should normally use getAlignmentReference, alignToReference and alignFromReference instead of this. The main intended application for this function is in streaming out alignments to the session file.

Definition at line 94 of file Model.cpp.

References Model::m_alignment.

◆ getAlignmentReference()

const Model * Model::getAlignmentReference ( ) const
virtualinherited

Return the reference model for the current alignment timeline, if any.

Definition at line 100 of file Model.cpp.

References Model::getAlignmentReference(), AlignmentModel::getReferenceModel(), Model::m_alignment, and Model::m_sourceModel.

Referenced by Model::getAlignmentReference().

◆ alignToReference()

int Model::alignToReference ( int  frame) const
virtualinherited

Return the frame number of the reference model that corresponds to the given frame number in this model.

Definition at line 110 of file Model.cpp.

References Model::alignToReference(), Model::getEndFrame(), AlignmentModel::getReferenceModel(), Model::m_alignment, Model::m_sourceModel, and AlignmentModel::toReference().

Referenced by Model::alignToReference().

◆ alignFromReference()

int Model::alignFromReference ( int  referenceFrame) const
virtualinherited

Return the frame number in this model that corresponds to the given frame number of the reference model.

Definition at line 125 of file Model.cpp.

References Model::alignFromReference(), AlignmentModel::fromReference(), Model::getEndFrame(), Model::m_alignment, and Model::m_sourceModel.

Referenced by Model::alignFromReference().

◆ getAlignmentCompletion()

int Model::getAlignmentCompletion ( ) const
virtualinherited

Return the completion percentage for the alignment model: 100 if there is no alignment model or it has been entirely calculated, or less than 100 if it is still being calculated.

Definition at line 139 of file Model.cpp.

References Model::getAlignmentCompletion(), AlignmentModel::isReady(), Model::m_alignment, and Model::m_sourceModel.

Referenced by Model::getAlignmentCompletion().

◆ setRDFTypeURI()

void Model::setRDFTypeURI ( QString  uri)
inlineinherited

Set the event, feature, or signal type URI for the features contained in this model, according to the Audio Features RDF ontology.

Definition at line 223 of file Model.h.

References Model::m_typeUri.

Referenced by FeatureExtractionModelTransformer::createOutputModels(), FeatureExtractionModelTransformer::getAdditionalModel(), RDFImporterImpl::getDataModelsDense(), and RDFImporterImpl::getDataModelsSparse().

◆ getRDFTypeURI()

QString Model::getRDFTypeURI ( ) const
inlineinherited

Retrieve the event, feature, or signal type URI for the features contained in this model, if previously set with setRDFTypeURI.

Definition at line 230 of file Model.h.

References Model::m_typeUri.

Referenced by FeatureExtractionModelTransformer::getAdditionalModel().

◆ aboutToDelete

◆ sourceModelAboutToBeDeleted

void Model::sourceModelAboutToBeDeleted ( )
slotinherited

Definition at line 76 of file Model.cpp.

References Model::m_sourceModel.

Referenced by Model::setSourceModel().

◆ modelChanged

◆ modelChangedWithin

void Model::modelChangedWithin ( int  startFrame,
int  endFrame 
)
signalinherited

Emitted when a model has been edited (or more data retrieved from cache, in the case of a cached model that generates slowly)

Referenced by WaveFileModel::cacheFilled(), WaveFileModel::fillTimerTimedOut(), EditableDenseThreeDimensionalModel::setColumn(), EditableDenseThreeDimensionalModel::setCompletion(), and WritableWaveFileModel::WritableWaveFileModel().

◆ completionChanged

void Model::completionChanged ( )
signalinherited

Emitted when some internal processing has advanced a stage, but the model has not changed externally.

Views should respond by updating any progress meters or other monitoring, but not refreshing the actual view.

Referenced by Model::setAlignment(), and EditableDenseThreeDimensionalModel::setCompletion().

◆ ready

void Model::ready ( )
signalinherited

Emitted when internal processing is complete (i.e.

when isReady() would return true, with completion at 100).

Referenced by WaveFileModel::cacheFilled(), WaveFileModel::isReady(), AggregateWaveModel::isReady(), and SparseModel< RegionRec >::isReady().

◆ alignmentCompletionChanged

void Model::alignmentCompletionChanged ( )
signalinherited

Emitted when the completion percentage changes for the calculation of this model's alignment model.

Referenced by Model::setAlignment(), and Model::setSourceModel().

◆ aboutToBeDeleted

void Model::aboutToBeDeleted ( )
signalinherited

Emitted when something notifies this model (through calling aboutToDelete() that it is about to delete it.

Note that this depends on an external agent such as a Document object or owning model telling the model that it is about to delete it; there is nothing in the model to guarantee that this signal will be emitted before the actual deletion.

Referenced by Model::aboutToDelete(), Dense3DModelPeakCache::Dense3DModelPeakCache(), and Model::setSourceModel().

◆ toXmlString()

QString XmlExportable::toXmlString ( QString  indent = "",
QString  extraAttributes = "" 
) const
virtualinherited

Convert this exportable object to XML in a string.

The default implementation calls toXml and returns the result as a string. Do not override this unless you really know what you're doing.

Definition at line 25 of file XmlExportable.cpp.

References XmlExportable::toXml().

Referenced by ModelTransformerFactory::getConfigurationForTransform(), and RDFTransformFactoryImpl::getTransforms().

◆ encodeEntities()

◆ encodeColour()

QString XmlExportable::encodeColour ( int  r,
int  g,
int  b 
)
staticinherited

Definition at line 54 of file XmlExportable.cpp.

◆ getObjectExportId()

int XmlExportable::getObjectExportId ( const void *  object)
staticinherited

◆ getDefaultPlayAudible()

virtual bool Playable::getDefaultPlayAudible ( ) const
inlinevirtualinherited

Reimplemented in SparseTimeValueModel.

Definition at line 28 of file Playable.h.

Referenced by PlayParameterRepository::addPlayable().

◆ isEditable()

virtual bool TabularModel::isEditable ( ) const
inlinevirtualinherited

Definition at line 54 of file TabularModel.h.

Member Data Documentation

◆ m_valueQuantization

float FlexiNoteModel::m_valueQuantization
protected

Definition at line 263 of file FlexiNoteModel.h.

Referenced by getValueQuantization(), setValueQuantization(), and toXml().

◆ m_valueMinimum

float SparseValueModel< FlexiNote >::m_valueMinimum
protectedinherited

Definition at line 132 of file SparseValueModel.h.

◆ m_valueMaximum

float SparseValueModel< FlexiNote >::m_valueMaximum
protectedinherited

Definition at line 133 of file SparseValueModel.h.

◆ m_haveExtents

bool SparseValueModel< FlexiNote >::m_haveExtents
protectedinherited

Definition at line 134 of file SparseValueModel.h.

◆ m_units

QString SparseValueModel< FlexiNote >::m_units
protectedinherited

Definition at line 135 of file SparseValueModel.h.

◆ m_sampleRate

int SparseModel< FlexiNote >::m_sampleRate
protectedinherited

Definition at line 374 of file SparseModel.h.

◆ m_resolution

int SparseModel< FlexiNote >::m_resolution
protectedinherited

Definition at line 375 of file SparseModel.h.

◆ m_notifyOnAdd

bool SparseModel< FlexiNote >::m_notifyOnAdd
protectedinherited

Definition at line 376 of file SparseModel.h.

◆ m_sinceLastNotifyMin

long SparseModel< FlexiNote >::m_sinceLastNotifyMin
protectedinherited

Definition at line 377 of file SparseModel.h.

◆ m_sinceLastNotifyMax

long SparseModel< FlexiNote >::m_sinceLastNotifyMax
protectedinherited

Definition at line 378 of file SparseModel.h.

◆ m_hasTextLabels

bool SparseModel< FlexiNote >::m_hasTextLabels
protectedinherited

Definition at line 379 of file SparseModel.h.

◆ m_points

PointList SparseModel< FlexiNote >::m_points
protectedinherited

Definition at line 381 of file SparseModel.h.

◆ m_pointCount

int SparseModel< FlexiNote >::m_pointCount
protectedinherited

Definition at line 382 of file SparseModel.h.

◆ m_mutex

QMutex SparseModel< FlexiNote >::m_mutex
mutableprotectedinherited

Definition at line 383 of file SparseModel.h.

◆ m_completion

int SparseModel< FlexiNote >::m_completion
protectedinherited

Definition at line 384 of file SparseModel.h.

◆ m_rows

std::vector<long> SparseModel< FlexiNote >::m_rows
mutableprotectedinherited

Definition at line 395 of file SparseModel.h.

◆ COMPLETION_UNKNOWN

const int Model::COMPLETION_UNKNOWN = -1
staticinherited

Definition at line 147 of file Model.h.

◆ m_sourceModel

◆ m_alignment

◆ m_typeUri

QString Model::m_typeUri
protectedinherited

Definition at line 303 of file Model.h.

Referenced by Model::getRDFTypeURI(), and Model::setRDFTypeURI().

◆ m_abandoning

bool Model::m_abandoning
protectedinherited

Definition at line 304 of file Model.h.

Referenced by Model::abandon(), and Model::isAbandoning().

◆ m_aboutToDelete

bool Model::m_aboutToDelete
protectedinherited

Definition at line 305 of file Model.h.

Referenced by Model::aboutToDelete(), and Model::~Model().


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