svcore
1.9
|
Model containing sparse data (points with some properties) of which the properties include a duration and an arbitrary float value. More...
#include <IntervalModel.h>
Public Types | |
typedef PointType | Point |
typedef std::multiset < PointType, typename PointType::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) | |
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) | |
void | completionChanged () |
Emitted when some internal processing has advanced a stage, but the model has not changed externally. | |
void | ready () |
Emitted when internal processing is complete (i.e. | |
void | alignmentCompletionChanged () |
Emitted when the completion percentage changes for the calculation of this model's alignment model. | |
void | aboutToBeDeleted () |
Emitted when something notifies this model (through calling aboutToDelete() that it is about to delete it. | |
Public Member Functions | |
IntervalModel (int sampleRate, int resolution, bool notifyOnAdd=true) | |
IntervalModel (int sampleRate, int resolution, float valueMinimum, float valueMaximum, bool notifyOnAdd=true) | |
virtual SparseValueModel < PointType >::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). | |
virtual SparseValueModel < PointType >::PointList | getPoints (long frame) const |
PointTypes have a duration, so this returns all points that span the given frame. | |
virtual const SparseModel < PointType >::PointList & | getPoints () const |
Get all points. | |
virtual QVariant | getData (int row, int column, int role) const |
TabularModel methods. | |
virtual Command * | getSetDataCommand (int row, int column, const QVariant &value, int role) |
virtual bool | isColumnTimeValue (int column) const |
QString | getTypeName () const |
Return the type of the model. | |
virtual float | getValueMinimum () const |
virtual float | getValueMaximum () const |
virtual QString | getScaleUnits () const |
virtual void | setScaleUnits (QString units) |
virtual void | addPoint (const PointType &point) |
Add a point. | |
virtual void | deletePoint (const PointType &point) |
Remove a point. | |
virtual void | toXml (QTextStream &stream, QString indent="", QString extraAttributes="") const |
Stream this exportable object out to XML on a text stream. | |
virtual bool | isOK () const |
Return true if the model was constructed successfully. | |
virtual int | getStartFrame () const |
Return the first audio frame spanned by the model. | |
virtual int | getEndFrame () const |
Return the last audio frame spanned by the model. | |
virtual int | getSampleRate () const |
Return the frame rate in frames per second. | |
virtual Model * | clone () const |
Return a copy of this model. | |
virtual int | getResolution () const |
virtual void | setResolution (int resolution) |
virtual bool | isEmpty () const |
Return whether the model is empty or not. | |
virtual int | getPointCount () const |
Get the total number of points in the model. | |
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. | |
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. | |
virtual void | clear () |
Remove all points. | |
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. | |
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. | |
virtual long | getFrameForRow (int row) const |
virtual int | getRowForFrame (long frame) const |
virtual int | getColumnCount () const |
virtual Command * | getInsertRowCommand (int row) |
virtual Command * | getRemoveRowCommand (int row) |
virtual int | getNativeRate () const |
Return the frame rate of the underlying material, if the model itself has already been resampled. | |
virtual QString | getTitle () const |
Return the "work title" of the model, if known. | |
virtual QString | getMaker () const |
Return the "artist" or "maker" of the model, if known. | |
virtual QString | getLocation () const |
Return the location of the data in this model (e.g. | |
virtual void | abandon () |
Mark the model as abandoning. | |
virtual bool | isAbandoning () const |
Query whether the model has been marked as abandoning. | |
virtual const ZoomConstraint * | getZoomConstraint () const |
If this model imposes a zoom constraint, i.e. | |
virtual Model * | getSourceModel () const |
If this model was derived from another, return the model it was derived from. | |
virtual void | setSourceModel (Model *model) |
Set the source model for this model. | |
virtual void | setAlignment (AlignmentModel *alignment) |
Specify an aligment between this model's timeline and that of a reference model. | |
virtual const AlignmentModel * | getAlignment () const |
Retrieve the alignment model for this model. | |
virtual const Model * | getAlignmentReference () const |
Return the reference model for the current alignment timeline, if any. | |
virtual int | alignToReference (int frame) const |
Return the frame number of the reference model that corresponds to the given frame number in this model. | |
virtual int | alignFromReference (int referenceFrame) const |
Return the frame number in this model that corresponds to the given frame number of the reference model. | |
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. | |
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. | |
QString | getRDFTypeURI () const |
Retrieve the event, feature, or signal type URI for the features contained in this model, if previously set with setRDFTypeURI. | |
virtual QString | toXmlString (QString indent="", QString extraAttributes="") const |
Convert this exportable object to XML in a string. | |
virtual bool | canPlay () const |
virtual QString | getDefaultPlayClipId () const |
virtual bool | getDefaultPlayAudible () const |
virtual QString | getHeading (int column) const =0 |
virtual SortType | getSortType (int col) const =0 |
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_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 |
Model * | m_sourceModel |
AlignmentModel * | m_alignment |
QString | m_typeUri |
bool | m_abandoning |
bool | m_aboutToDelete |
Model containing sparse data (points with some properties) of which the properties include a duration and an arbitrary float value.
The other properties depend on the point type.
Definition at line 29 of file IntervalModel.h.
typedef PointType SparseModel< PointType >::Point [inherited] |
Definition at line 67 of file SparseModel.h.
typedef std::multiset<PointType, typename PointType::OrderComparator> SparseModel< PointType >::PointList [inherited] |
Definition at line 69 of file SparseModel.h.
typedef PointList::iterator SparseModel< PointType >::PointListIterator [inherited] |
Definition at line 70 of file SparseModel.h.
typedef PointList::const_iterator SparseModel< PointType >::PointListConstIterator [inherited] |
Definition at line 71 of file SparseModel.h.
anonymous enum [inherited] |
Definition at line 44 of file TabularModel.h.
enum TabularModel::SortType [inherited] |
Definition at line 45 of file TabularModel.h.
IntervalModel< PointType >::IntervalModel | ( | int | sampleRate, |
int | resolution, | ||
bool | notifyOnAdd = true |
||
) | [inline] |
Definition at line 32 of file IntervalModel.h.
IntervalModel< PointType >::IntervalModel | ( | int | sampleRate, |
int | resolution, | ||
float | valueMinimum, | ||
float | valueMaximum, | ||
bool | notifyOnAdd = true |
||
) | [inline] |
Definition at line 37 of file IntervalModel.h.
SparseValueModel< PointType >::PointList IntervalModel< PointType >::getPoints | ( | long | start, |
long | end | ||
) | const [virtual] |
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< PointType >.
Definition at line 128 of file IntervalModel.h.
References mutex.
Referenced by CSVFileReader::load(), and RDFExporter::write().
SparseValueModel< PointType >::PointList IntervalModel< PointType >::getPoints | ( | long | frame | ) | const [virtual] |
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< PointType >.
Definition at line 162 of file IntervalModel.h.
References mutex.
virtual const SparseModel<PointType>::PointList& IntervalModel< PointType >::getPoints | ( | ) | const [inline, virtual] |
Get all points.
Reimplemented from SparseModel< PointType >.
Definition at line 60 of file IntervalModel.h.
Referenced by IntervalModel< RegionRec >::getPoints().
virtual QVariant IntervalModel< PointType >::getData | ( | int | row, |
int | column, | ||
int | role | ||
) | const [inline, virtual] |
TabularModel methods.
!! could be better presented
Reimplemented from SparseModel< PointType >.
Reimplemented in FlexiNoteModel, NoteModel, and RegionModel.
Definition at line 68 of file IntervalModel.h.
Referenced by IntervalModel< RegionRec >::getData().
virtual Command* IntervalModel< PointType >::getSetDataCommand | ( | int | row, |
int | column, | ||
const QVariant & | value, | ||
int | role | ||
) | [inline, virtual] |
Reimplemented from SparseModel< PointType >.
Reimplemented in FlexiNoteModel, NoteModel, and RegionModel.
Definition at line 89 of file IntervalModel.h.
Referenced by IntervalModel< RegionRec >::getSetDataCommand().
virtual bool IntervalModel< PointType >::isColumnTimeValue | ( | int | column | ) | const [inline, virtual] |
Implements TabularModel.
Definition at line 118 of file IntervalModel.h.
QString SparseValueModel< PointType >::getTypeName | ( | ) | const [inline, virtual, inherited] |
Return the type of the model.
For display purposes only.
Reimplemented from SparseModel< PointType >.
Reimplemented in FlexiNoteModel, NoteModel, RegionModel, and SparseTimeValueModel.
Definition at line 56 of file SparseValueModel.h.
virtual float SparseValueModel< PointType >::getValueMinimum | ( | ) | const [inline, virtual, inherited] |
Reimplemented in FlexiNoteModel.
Definition at line 58 of file SparseValueModel.h.
Referenced by FeatureExtractionModelTransformer::getAdditionalModel().
virtual float SparseValueModel< PointType >::getValueMaximum | ( | ) | const [inline, virtual, inherited] |
Reimplemented in FlexiNoteModel.
Definition at line 59 of file SparseValueModel.h.
Referenced by RDFImporterImpl::fillModel(), and FeatureExtractionModelTransformer::getAdditionalModel().
virtual QString SparseValueModel< PointType >::getScaleUnits | ( | ) | const [inline, virtual, inherited] |
Definition at line 61 of file SparseValueModel.h.
Referenced by FeatureExtractionModelTransformer::getAdditionalModel().
virtual void SparseValueModel< PointType >::setScaleUnits | ( | QString | units | ) | [inline, virtual, inherited] |
Definition at line 62 of file SparseValueModel.h.
Referenced by FeatureExtractionModelTransformer::createOutputModels(), FeatureExtractionModelTransformer::getAdditionalModel(), CSVFileReader::load(), and RealTimeEffectModelTransformer::RealTimeEffectModelTransformer().
virtual void SparseValueModel< PointType >::addPoint | ( | const PointType & | point | ) | [inline, virtual, inherited] |
Add a point.
!! inefficient
Reimplemented from SparseModel< PointType >.
Reimplemented in RegionModel.
Definition at line 67 of file SparseValueModel.h.
Referenced by FeatureExtractionModelTransformer::addFeature(), SparseValueModel< RegionRec >::addPoint(), RDFImporterImpl::fillModel(), RDFImporterImpl::getDataModelsDense(), CSVFileReader::load(), MIDIFileReader::loadTrack(), and RealTimeEffectModelTransformer::run().
virtual void SparseValueModel< PointType >::deletePoint | ( | const PointType & | point | ) | [inline, virtual, inherited] |
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.
!! inefficient
Reimplemented from SparseModel< PointType >.
Definition at line 87 of file SparseValueModel.h.
Referenced by SparseValueModel< RegionRec >::deletePoint(), and CSVFileReader::load().
virtual void SparseValueModel< PointType >::toXml | ( | QTextStream & | stream, |
QString | indent = "" , |
||
QString | extraAttributes = "" |
||
) | const [inline, virtual, inherited] |
Stream this exportable object out to XML on a text stream.
Reimplemented from SparseModel< PointType >.
Reimplemented in FlexiNoteModel, NoteModel, and RegionModel.
Definition at line 116 of file SparseValueModel.h.
Referenced by SparseValueModel< RegionRec >::toXml().
virtual bool SparseModel< PointType >::isOK | ( | ) | const [inline, virtual, inherited] |
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.
Referenced by AlignmentModel::isOK(), and SparseModel< RegionRec >::isReady().
int SparseModel< PointType >::getStartFrame | ( | ) | const [virtual, inherited] |
Return the first audio frame spanned by the model.
Implements Model.
Definition at line 484 of file SparseModel.h.
int SparseModel< PointType >::getEndFrame | ( | ) | const [virtual, inherited] |
Return the last audio frame spanned by the model.
Implements Model.
Definition at line 496 of file SparseModel.h.
virtual int SparseModel< PointType >::getSampleRate | ( | ) | const [inline, virtual, inherited] |
Return the frame rate in frames per second.
Implements Model.
Definition at line 53 of file SparseModel.h.
Referenced by AlignmentModel::constructPath(), AlignmentModel::constructReversePath(), FeatureExtractionModelTransformer::getAdditionalModel(), SparseModel< RegionRec >::getData(), SparseModel< RegionRec >::getSetDataCommand(), and MIDIFileReader::loadTrack().
Model * SparseModel< PointType >::clone | ( | ) | const [virtual, inherited] |
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.
Referenced by AlignmentModel::clone().
virtual int SparseModel< PointType >::getResolution | ( | ) | const [inline, virtual, inherited] |
Definition at line 62 of file SparseModel.h.
Referenced by AlignmentModel::constructPath(), AlignmentModel::constructReversePath(), and FeatureExtractionModelTransformer::getAdditionalModel().
void SparseModel< PointType >::setResolution | ( | int | resolution | ) | [virtual, inherited] |
Definition at line 679 of file SparseModel.h.
bool SparseModel< PointType >::isEmpty | ( | ) | const [virtual, inherited] |
Return whether the model is empty or not.
Definition at line 523 of file SparseModel.h.
int SparseModel< PointType >::getPointCount | ( | ) | const [virtual, inherited] |
Get the total number of points in the model.
Definition at line 530 of file SparseModel.h.
Referenced by AlignmentModel::constructPath(), and AlignmentModel::constructReversePath().
SparseModel< PointType >::PointList SparseModel< PointType >::getPreviousPoints | ( | long | frame | ) | const [virtual, inherited] |
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.
SparseModel< PointType >::PointList SparseModel< PointType >::getNextPoints | ( | long | frame | ) | const [virtual, inherited] |
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.
void SparseModel< PointType >::clear | ( | ) | [virtual, inherited] |
Remove all points.
Definition at line 691 of file SparseModel.h.
Referenced by AlignmentModel::constructPath(), and AlignmentModel::constructReversePath().
virtual bool SparseModel< PointType >::isReady | ( | int * | completion = 0 | ) | const [inline, virtual, inherited] |
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.
Referenced by AlignmentModel::AlignmentModel(), AlignmentModel::isReady(), and AlignmentModel::pathCompletionChanged().
void SparseModel< PointType >::setCompletion | ( | int | completion, |
bool | update = true |
||
) | [virtual, inherited] |
!! inefficient
!! inefficient
Definition at line 761 of file SparseModel.h.
Referenced by MIDIFileReader::loadTrack(), RealTimeEffectModelTransformer::run(), and FeatureExtractionModelTransformer::setCompletion().
virtual int SparseModel< PointType >::getCompletion | ( | ) | const [inline, virtual, inherited] |
Definition at line 139 of file SparseModel.h.
virtual bool SparseModel< PointType >::hasTextLabels | ( | ) | const [inline, virtual, inherited] |
Definition at line 141 of file SparseModel.h.
virtual QString SparseModel< PointType >::getXmlOutputType | ( | ) | const [inline, virtual, inherited] |
Definition at line 145 of file SparseModel.h.
virtual QString SparseModel< PointType >::toDelimitedDataString | ( | QString | delimiter | ) | const [inline, virtual, inherited] |
Reimplemented from Model.
Definition at line 151 of file SparseModel.h.
virtual QString SparseModel< PointType >::toDelimitedDataStringSubset | ( | QString | delimiter, |
int | f0, | ||
int | f1 | ||
) | const [inline, virtual, inherited] |
Reimplemented from Model.
Definition at line 160 of file SparseModel.h.
virtual int SparseModel< PointType >::getRowCount | ( | ) | const [inline, virtual, inherited] |
virtual long SparseModel< PointType >::getFrameForRow | ( | int | row | ) | const [inline, virtual, inherited] |
Implements TabularModel.
Definition at line 290 of file SparseModel.h.
virtual int SparseModel< PointType >::getRowForFrame | ( | long | frame | ) | const [inline, virtual, inherited] |
Implements TabularModel.
Definition at line 297 of file SparseModel.h.
virtual int SparseModel< PointType >::getColumnCount | ( | ) | const [inline, virtual, inherited] |
Implements TabularModel.
Reimplemented in FlexiNoteModel, NoteModel, RegionModel, ImageModel, SparseTimeValueModel, SparseOneDimensionalModel, and TextModel.
Definition at line 314 of file SparseModel.h.
virtual Command* SparseModel< PointType >::getInsertRowCommand | ( | int | row | ) | [inline, virtual, inherited] |
Reimplemented from TabularModel.
Definition at line 353 of file SparseModel.h.
virtual Command* SparseModel< PointType >::getRemoveRowCommand | ( | int | row | ) | [inline, virtual, inherited] |
Reimplemented from TabularModel.
Definition at line 364 of file SparseModel.h.
void SparseModel< PointType >::getPointIterators | ( | long | frame, |
PointListIterator & | startItr, | ||
PointListIterator & | endItr | ||
) | [protected, inherited] |
Definition at line 586 of file SparseModel.h.
Referenced by SparseModel< RegionRec >::getPointListIteratorForRow().
void SparseModel< PointType >::getPointIterators | ( | long | frame, |
PointListConstIterator & | startItr, | ||
PointListConstIterator & | endItr | ||
) | const [protected, inherited] |
Definition at line 609 of file SparseModel.h.
void SparseModel< PointType >::rebuildRowVector | ( | ) | const [inline, protected, inherited] |
Definition at line 396 of file SparseModel.h.
Referenced by SparseModel< RegionRec >::getPointListIteratorForRow(), and SparseModel< RegionRec >::getRowForFrame().
PointListIterator SparseModel< PointType >::getPointListIteratorForRow | ( | int | row | ) | [inline, protected, inherited] |
Definition at line 405 of file SparseModel.h.
Referenced by IntervalModel< RegionRec >::getData(), SparseModel< RegionRec >::getData(), SparseModel< RegionRec >::getFrameForRow(), SparseModel< RegionRec >::getInsertRowCommand(), SparseModel< RegionRec >::getRemoveRowCommand(), IntervalModel< RegionRec >::getSetDataCommand(), and SparseModel< RegionRec >::getSetDataCommand().
PointListConstIterator SparseModel< PointType >::getPointListIteratorForRow | ( | int | row | ) | const [inline, protected, inherited] |
Definition at line 432 of file SparseModel.h.
virtual int Model::getNativeRate | ( | ) | const [inline, virtual, inherited] |
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().
QString Model::getTitle | ( | ) | const [virtual, inherited] |
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().
QString Model::getMaker | ( | ) | const [virtual, inherited] |
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().
QString Model::getLocation | ( | ) | const [virtual, inherited] |
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().
virtual void Model::abandon | ( | ) | [inline, virtual, inherited] |
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.
virtual bool Model::isAbandoning | ( | ) | const [inline, virtual, inherited] |
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().
virtual const ZoomConstraint* Model::getZoomConstraint | ( | ) | const [inline, virtual, inherited] |
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.
virtual Model* Model::getSourceModel | ( | ) | const [inline, virtual, inherited] |
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.
void Model::setSourceModel | ( | Model * | model | ) | [virtual, inherited] |
Set the source model for this model.
Definition at line 42 of file Model.cpp.
References Model::aboutToBeDeleted(), Model::alignmentCompletionChanged(), Model::m_sourceModel, and Model::sourceModelAboutToBeDeleted().
Referenced by FeatureExtractionModelTransformer::createOutputModels(), FFTModel::FFTModel(), and RDFImporterImpl::getDataModelsSparse().
void Model::setAlignment | ( | AlignmentModel * | alignment | ) | [virtual, inherited] |
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.
const AlignmentModel * Model::getAlignment | ( | ) | const [virtual, inherited] |
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.
const Model * Model::getAlignmentReference | ( | ) | const [virtual, inherited] |
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().
int Model::alignToReference | ( | int | frame | ) | const [virtual, inherited] |
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().
int Model::alignFromReference | ( | int | referenceFrame | ) | const [virtual, inherited] |
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().
int Model::getAlignmentCompletion | ( | ) | const [virtual, inherited] |
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().
void Model::setRDFTypeURI | ( | QString | uri | ) | [inline, inherited] |
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().
QString Model::getRDFTypeURI | ( | ) | const [inline, inherited] |
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().
void Model::aboutToDelete | ( | ) | [slot, inherited] |
Definition at line 60 of file Model.cpp.
References Model::aboutToBeDeleted(), and Model::m_aboutToDelete.
Referenced by AlignmentModel::pathChanged(), AlignmentModel::pathCompletionChanged(), Model::setAlignment(), AlignmentModel::setPath(), AlignmentModel::~AlignmentModel(), and Model::~Model().
void Model::sourceModelAboutToBeDeleted | ( | ) | [slot, inherited] |
Reimplemented in FFTModel, and Dense3DModelPeakCache.
Definition at line 76 of file Model.cpp.
References Model::m_sourceModel.
Referenced by Model::setSourceModel().
void Model::modelChanged | ( | ) | [signal, inherited] |
Emitted when a model has been edited (or more data retrieved from cache, in the case of a cached model that generates slowly)
Reimplemented in AggregateWaveModel, and AlignmentModel.
Referenced by SparseValueModel< RegionRec >::addPoint(), WaveFileModel::cacheFilled(), SparseValueModel< RegionRec >::deletePoint(), Dense3DModelPeakCache::Dense3DModelPeakCache(), WaveFileModel::fillTimerTimedOut(), EditableDenseThreeDimensionalModel::setBinName(), EditableDenseThreeDimensionalModel::setBinNames(), EditableDenseThreeDimensionalModel::setColumn(), EditableDenseThreeDimensionalModel::setCompletion(), and WritableWaveFileModel::WritableWaveFileModel().
void Model::modelChangedWithin | ( | int | startFrame, |
int | endFrame | ||
) | [signal, inherited] |
Emitted when a model has been edited (or more data retrieved from cache, in the case of a cached model that generates slowly)
Reimplemented in AggregateWaveModel, and AlignmentModel.
Referenced by WaveFileModel::cacheFilled(), WaveFileModel::fillTimerTimedOut(), EditableDenseThreeDimensionalModel::setColumn(), EditableDenseThreeDimensionalModel::setCompletion(), and WritableWaveFileModel::WritableWaveFileModel().
void Model::completionChanged | ( | ) | [signal, inherited] |
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.
Reimplemented in AggregateWaveModel, and AlignmentModel.
Referenced by Model::setAlignment(), and EditableDenseThreeDimensionalModel::setCompletion().
void Model::ready | ( | ) | [signal, inherited] |
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().
void Model::alignmentCompletionChanged | ( | ) | [signal, inherited] |
Emitted when the completion percentage changes for the calculation of this model's alignment model.
Referenced by Model::setAlignment(), and Model::setSourceModel().
void Model::aboutToBeDeleted | ( | ) | [signal, inherited] |
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().
QString XmlExportable::toXmlString | ( | QString | indent = "" , |
QString | extraAttributes = "" |
||
) | const [virtual, inherited] |
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().
QString XmlExportable::encodeEntities | ( | QString | s | ) | [static, inherited] |
Definition at line 41 of file XmlExportable.cpp.
Referenced by TextMatcher::test(), PluginXml::toXml(), OneDimensionalPoint::toXml(), TimeValuePoint::toXml(), TextPoint::toXml(), ImagePoint::toXml(), RegionRec::toXml(), Note::toXml(), FlexiNote::toXml(), WritableWaveFileModel::toXml(), WaveFileModel::toXml(), SparseValueModel< RegionRec >::toXml(), Transform::toXml(), and Model::toXml().
QString XmlExportable::encodeColour | ( | int | r, |
int | g, | ||
int | b | ||
) | [static, inherited] |
Definition at line 54 of file XmlExportable.cpp.
int XmlExportable::getObjectExportId | ( | const void * | object | ) | [static, inherited] |
Definition at line 71 of file XmlExportable.cpp.
References mutex.
Referenced by FFTDataServer::generateFileBasename(), AlignmentModel::toXml(), EditableDenseThreeDimensionalModel::toXml(), and Model::toXml().
virtual bool Playable::canPlay | ( | ) | const [inline, virtual, inherited] |
Reimplemented in FlexiNoteModel, NoteModel, SparseTimeValueModel, SparseOneDimensionalModel, and DenseTimeValueModel.
Definition at line 26 of file Playable.h.
virtual QString Playable::getDefaultPlayClipId | ( | ) | const [inline, virtual, inherited] |
Reimplemented in FlexiNoteModel, NoteModel, SparseOneDimensionalModel, and DenseTimeValueModel.
Definition at line 27 of file Playable.h.
Referenced by PlayParameterRepository::addPlayable().
virtual bool Playable::getDefaultPlayAudible | ( | ) | const [inline, virtual, inherited] |
Reimplemented in SparseTimeValueModel.
Definition at line 28 of file Playable.h.
Referenced by PlayParameterRepository::addPlayable().
virtual QString TabularModel::getHeading | ( | int | column | ) | const [pure virtual, inherited] |
Implemented in FlexiNoteModel, NoteModel, RegionModel, ImageModel, DenseThreeDimensionalModel, SparseTimeValueModel, SparseOneDimensionalModel, TextModel, and PathModel.
Referenced by ModelDataTableModel::headerData().
virtual SortType TabularModel::getSortType | ( | int | col | ) | const [pure virtual, inherited] |
Implemented in FlexiNoteModel, NoteModel, ImageModel, RegionModel, SparseTimeValueModel, SparseOneDimensionalModel, TextModel, DenseThreeDimensionalModel, and PathModel.
Referenced by ModelDataTableModel::findText(), and ModelDataTableModel::resort().
virtual bool TabularModel::isEditable | ( | ) | const [inline, virtual, inherited] |
Definition at line 54 of file TabularModel.h.
float SparseValueModel< PointType >::m_valueMinimum [protected, inherited] |
Definition at line 132 of file SparseValueModel.h.
Referenced by SparseValueModel< RegionRec >::addPoint(), SparseValueModel< RegionRec >::deletePoint(), SparseValueModel< RegionRec >::getValueMinimum(), and SparseValueModel< RegionRec >::toXml().
float SparseValueModel< PointType >::m_valueMaximum [protected, inherited] |
Definition at line 133 of file SparseValueModel.h.
Referenced by SparseValueModel< RegionRec >::addPoint(), SparseValueModel< RegionRec >::deletePoint(), SparseValueModel< RegionRec >::getValueMaximum(), and SparseValueModel< RegionRec >::toXml().
bool SparseValueModel< PointType >::m_haveExtents [protected, inherited] |
Definition at line 134 of file SparseValueModel.h.
Referenced by SparseValueModel< RegionRec >::addPoint().
QString SparseValueModel< PointType >::m_units [protected, inherited] |
Definition at line 135 of file SparseValueModel.h.
Referenced by SparseValueModel< RegionRec >::getScaleUnits(), SparseValueModel< RegionRec >::setScaleUnits(), and SparseValueModel< RegionRec >::toXml().
int SparseModel< PointType >::m_sampleRate [protected, inherited] |
Definition at line 374 of file SparseModel.h.
Referenced by SparseModel< RegionRec >::getSampleRate(), SparseModel< RegionRec >::toDelimitedDataString(), and SparseModel< RegionRec >::toDelimitedDataStringSubset().
int SparseModel< PointType >::m_resolution [protected, inherited] |
Definition at line 375 of file SparseModel.h.
Referenced by SparseModel< RegionRec >::getResolution().
bool SparseModel< PointType >::m_notifyOnAdd [protected, inherited] |
Definition at line 376 of file SparseModel.h.
long SparseModel< PointType >::m_sinceLastNotifyMin [protected, inherited] |
Definition at line 377 of file SparseModel.h.
long SparseModel< PointType >::m_sinceLastNotifyMax [protected, inherited] |
Definition at line 378 of file SparseModel.h.
bool SparseModel< PointType >::m_hasTextLabels [protected, inherited] |
Definition at line 379 of file SparseModel.h.
Referenced by SparseModel< RegionRec >::hasTextLabels().
PointList SparseModel< PointType >::m_points [protected, inherited] |
Definition at line 381 of file SparseModel.h.
Referenced by SparseValueModel< RegionRec >::deletePoint(), SparseModel< RegionRec >::getData(), SparseModel< RegionRec >::getFrameForRow(), SparseModel< RegionRec >::getInsertRowCommand(), SparseModel< RegionRec >::getPointListIteratorForRow(), SparseModel< RegionRec >::getRemoveRowCommand(), SparseModel< RegionRec >::getRowCount(), SparseModel< RegionRec >::getSetDataCommand(), SparseModel< RegionRec >::rebuildRowVector(), SparseModel< RegionRec >::toDelimitedDataString(), and SparseModel< RegionRec >::toDelimitedDataStringSubset().
int SparseModel< PointType >::m_pointCount [protected, inherited] |
Definition at line 382 of file SparseModel.h.
QMutex SparseModel< PointType >::m_mutex [mutable, protected, inherited] |
Definition at line 383 of file SparseModel.h.
int SparseModel< PointType >::m_completion [protected, inherited] |
Definition at line 384 of file SparseModel.h.
Referenced by SparseModel< RegionRec >::getCompletion(), and SparseModel< RegionRec >::isReady().
std::vector<long> SparseModel< PointType >::m_rows [mutable, protected, inherited] |
Definition at line 395 of file SparseModel.h.
Referenced by SparseModel< RegionRec >::getPointListIteratorForRow(), SparseModel< RegionRec >::getRowForFrame(), and SparseModel< RegionRec >::rebuildRowVector().
const int Model::COMPLETION_UNKNOWN = -1 [static, inherited] |
Model* Model::m_sourceModel [protected, inherited] |
Definition at line 301 of file Model.h.
Referenced by Model::alignFromReference(), Model::alignToReference(), Model::getAlignmentCompletion(), Model::getAlignmentReference(), Model::getLocation(), Model::getMaker(), Model::getSourceModel(), Model::getTitle(), Model::setSourceModel(), FFTModel::sourceModelAboutToBeDeleted(), and Model::sourceModelAboutToBeDeleted().
AlignmentModel* Model::m_alignment [protected, inherited] |
Definition at line 302 of file Model.h.
Referenced by Model::alignFromReference(), Model::alignToReference(), Model::getAlignment(), Model::getAlignmentCompletion(), Model::getAlignmentReference(), Model::setAlignment(), and Model::~Model().
QString Model::m_typeUri [protected, inherited] |
Definition at line 303 of file Model.h.
Referenced by Model::getRDFTypeURI(), and Model::setRDFTypeURI().
bool Model::m_abandoning [protected, inherited] |
Definition at line 304 of file Model.h.
Referenced by Model::abandon(), and Model::isAbandoning().
bool Model::m_aboutToDelete [protected, inherited] |
Definition at line 305 of file Model.h.
Referenced by Model::aboutToDelete(), and Model::~Model().