svcore
1.9
|
#include <WaveFileModel.h>
Classes | |
class | RangeCacheFillThread |
Public Types | |
typedef std::vector< Range > | RangeBlock |
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 | |
WaveFileModel (FileSource source, int targetRate=0) | |
WaveFileModel (FileSource source, AudioFileReader *reader) | |
~WaveFileModel () | |
bool | isOK () const |
Return true if the model was constructed successfully. | |
bool | isReady (int *) 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. | |
const ZoomConstraint * | getZoomConstraint () const |
If this model imposes a zoom constraint, i.e. | |
int | getFrameCount () const |
int | getChannelCount () const |
Return the number of distinct channels for this model. | |
int | getSampleRate () const |
Return the frame rate in frames per second. | |
int | getNativeRate () const |
Return the frame rate of the underlying material, if the model itself has already been resampled. | |
QString | getTitle () const |
Return the "work title" of the model, if known. | |
QString | getMaker () const |
Return the "artist" or "maker" of the model, if known. | |
QString | getLocation () const |
Return the location of the data in this model (e.g. | |
virtual Model * | clone () const |
Return a copy of this model. | |
float | getValueMinimum () const |
Return the minimum possible value found in this model type. | |
float | getValueMaximum () const |
Return the minimum possible value found in this model type. | |
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. | |
void | setStartFrame (int startFrame) |
virtual int | getData (int channel, int start, int count, float *buffer) const |
Get the specified set of samples from the given channel of the model in single-precision floating-point format. | |
virtual int | getData (int channel, int start, int count, double *buffer) const |
Get the specified set of samples from the given channel of the model in double-precision floating-point format. | |
virtual int | getData (int fromchannel, int tochannel, int start, int count, float **buffers) const |
Get the specified set of samples from given contiguous range of channels of the model in single-precision floating-point format. | |
virtual int | getSummaryBlockSize (int desired) const |
virtual void | getSummaries (int channel, int start, int count, RangeBlock &ranges, int &blockSize) const |
Return ranges from the given start frame, corresponding to the given number of underlying sample frames, summarised at the given block size. | |
virtual Range | getSummary (int channel, int start, int count) const |
Return the range from the given start frame, corresponding to the given number of underlying sample frames, summarised at a block size equal to the distance between start and end frames. | |
QString | getTypeName () const |
Return the type of the model. | |
virtual void | toXml (QTextStream &out, QString indent="", QString extraAttributes="") const |
Stream this exportable object out to XML on a text stream. | |
virtual bool | canPlay () const |
virtual QString | getDefaultPlayClipId () const |
virtual QString | toDelimitedDataStringSubset (QString delimiter, int f0, int f1) const |
virtual void | abandon () |
Mark the model as abandoning. | |
virtual bool | isAbandoning () const |
Query whether the model has been marked as abandoning. | |
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 | toDelimitedDataString (QString delimiter) const |
virtual QString | toXmlString (QString indent="", QString extraAttributes="") const |
Convert this exportable object to XML in a string. | |
virtual bool | getDefaultPlayAudible () 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 Slots | |
void | fillTimerTimedOut () |
void | cacheFilled () |
Protected Member Functions | |
void | initialize () |
void | fillCache () |
Protected Attributes | |
FileSource | m_source |
QString | m_path |
AudioFileReader * | m_reader |
bool | m_myReader |
int | m_startFrame |
RangeBlock | m_cache [2] |
QMutex | m_mutex |
RangeCacheFillThread * | m_fillThread |
QTimer * | m_updateTimer |
int | m_lastFillExtent |
bool | m_exiting |
SampleBlock | m_directRead |
int | m_lastDirectReadStart |
int | m_lastDirectReadCount |
QMutex | m_directReadMutex |
Model * | m_sourceModel |
AlignmentModel * | m_alignment |
QString | m_typeUri |
bool | m_abandoning |
bool | m_aboutToDelete |
Static Protected Attributes | |
static PowerOfSqrtTwoZoomConstraint | m_zoomConstraint |
Definition at line 32 of file WaveFileModel.h.
typedef std::vector<Range> RangeSummarisableTimeValueModel::RangeBlock [inherited] |
Definition at line 64 of file RangeSummarisableTimeValueModel.h.
WaveFileModel::WaveFileModel | ( | FileSource | source, |
int | targetRate = 0 |
||
) |
Definition at line 40 of file WaveFileModel.cpp.
References AudioFileReaderFactory::createThreadingReader(), fillCache(), Preferences::getInstance(), Preferences::getNormaliseAudio(), AudioFileReader::getSampleRate(), AudioFileReader::getTitle(), isOK(), FileSource::isOK(), m_path, m_reader, m_source, SVDEBUG, and FileSource::waitForData().
Referenced by clone().
WaveFileModel::WaveFileModel | ( | FileSource | source, |
AudioFileReader * | reader | ||
) |
Definition at line 68 of file WaveFileModel.cpp.
References fillCache(), AudioFileReader::getTitle(), m_path, and m_reader.
Definition at line 85 of file WaveFileModel.cpp.
References m_exiting, m_fillThread, m_myReader, and m_reader.
bool WaveFileModel::isOK | ( | ) | const [virtual] |
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 94 of file WaveFileModel.cpp.
References AudioFileReader::isOK(), and m_reader.
Referenced by RDFImporterImpl::getDataModelsAudio(), getSummaries(), getSummary(), isReady(), WaveFileModel::RangeCacheFillThread::run(), WaveFileModel(), and WritableWaveFileModel::WritableWaveFileModel().
bool WaveFileModel::isReady | ( | int * | completion | ) | const [virtual] |
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 100 of file WaveFileModel.cpp.
References AudioFileReader::getDecodeCompletion(), getEndFrame(), getStartFrame(), isOK(), m_fillThread, m_lastFillExtent, m_reader, Model::ready(), and SVDEBUG.
const ZoomConstraint* WaveFileModel::getZoomConstraint | ( | ) | const [inline, virtual] |
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 from Model.
Definition at line 44 of file WaveFileModel.h.
References m_zoomConstraint.
int WaveFileModel::getFrameCount | ( | ) | const |
Definition at line 135 of file WaveFileModel.cpp.
References AudioFileReader::getFrameCount(), and m_reader.
Referenced by getEndFrame(), getSummaries(), and WaveFileModel::RangeCacheFillThread::run().
int WaveFileModel::getChannelCount | ( | ) | const [virtual] |
Return the number of distinct channels for this model.
Implements DenseTimeValueModel.
Definition at line 142 of file WaveFileModel.cpp.
References AudioFileReader::getChannelCount(), and m_reader.
Referenced by getData(), WritableWaveFileModel::getData(), WritableWaveFileModel::getSummaries(), getSummaries(), WritableWaveFileModel::getSummary(), WaveFileModel::RangeCacheFillThread::run(), and WritableWaveFileModel::toXml().
int WaveFileModel::getSampleRate | ( | ) | const [virtual] |
Return the frame rate in frames per second.
Implements Model.
Definition at line 149 of file WaveFileModel.cpp.
References AudioFileReader::getSampleRate(), and m_reader.
Referenced by RDFImporterImpl::getDataModelsAudio(), and getNativeRate().
int WaveFileModel::getNativeRate | ( | ) | const [virtual] |
Return the frame rate of the underlying material, if the model itself has already been resampled.
Reimplemented from Model.
Definition at line 156 of file WaveFileModel.cpp.
References AudioFileReader::getNativeRate(), getSampleRate(), and m_reader.
QString WaveFileModel::getTitle | ( | ) | const [virtual] |
Return the "work title" of the model, if known.
Reimplemented from Model.
Definition at line 165 of file WaveFileModel.cpp.
References AudioFileReader::getTitle(), and m_reader.
QString WaveFileModel::getMaker | ( | ) | const [virtual] |
Return the "artist" or "maker" of the model, if known.
Reimplemented from Model.
Definition at line 174 of file WaveFileModel.cpp.
References AudioFileReader::getMaker(), and m_reader.
QString WaveFileModel::getLocation | ( | ) | const [virtual] |
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 from Model.
Definition at line 181 of file WaveFileModel.cpp.
References AudioFileReader::getLocation(), and m_reader.
Model * WaveFileModel::clone | ( | ) | const [virtual] |
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.
Implements Model.
Definition at line 128 of file WaveFileModel.cpp.
References m_source, and WaveFileModel().
float WaveFileModel::getValueMinimum | ( | ) | const [inline, virtual] |
Return the minimum possible value found in this model type.
(That is, the minimum that would be valid, not the minimum actually found in a particular model).
Implements DenseTimeValueModel.
Definition at line 57 of file WaveFileModel.h.
float WaveFileModel::getValueMaximum | ( | ) | const [inline, virtual] |
Return the minimum possible value found in this model type.
(That is, the minimum that would be valid, not the minimum actually found in a particular model).
Implements DenseTimeValueModel.
Definition at line 58 of file WaveFileModel.h.
virtual int WaveFileModel::getStartFrame | ( | ) | const [inline, virtual] |
Return the first audio frame spanned by the model.
Implements Model.
Definition at line 60 of file WaveFileModel.h.
References m_startFrame.
Referenced by isReady().
virtual int WaveFileModel::getEndFrame | ( | ) | const [inline, virtual] |
Return the last audio frame spanned by the model.
Implements Model.
Definition at line 61 of file WaveFileModel.h.
References getFrameCount(), and m_startFrame.
Referenced by cacheFilled(), and isReady().
void WaveFileModel::setStartFrame | ( | int | startFrame | ) | [inline] |
Definition at line 63 of file WaveFileModel.h.
References m_startFrame.
Referenced by WritableWaveFileModel::setStartFrame(), and WritableWaveFileModel::WritableWaveFileModel().
int WaveFileModel::getData | ( | int | channel, |
int | start, | ||
int | count, | ||
float * | buffer | ||
) | const [virtual] |
Get the specified set of samples from the given channel of the model in single-precision floating-point format.
Return the number of samples actually retrieved. If the channel is given as -1, mix all available channels and return the result.
Implements DenseTimeValueModel.
Definition at line 188 of file WaveFileModel.cpp.
References getChannelCount(), AudioFileReader::getInterleavedFrames(), AudioFileReader::isOK(), m_reader, and m_startFrame.
Referenced by WritableWaveFileModel::getData(), and getData().
int WaveFileModel::getData | ( | int | channel, |
int | start, | ||
int | count, | ||
double * | buffer | ||
) | const [virtual] |
Get the specified set of samples from the given channel of the model in double-precision floating-point format.
Return the number of samples actually retrieved. If the channel is given as -1, mix all available channels and return the result.
Implements DenseTimeValueModel.
Definition at line 256 of file WaveFileModel.cpp.
References getChannelCount(), AudioFileReader::getInterleavedFrames(), AudioFileReader::isOK(), m_reader, and m_startFrame.
int WaveFileModel::getData | ( | int | fromchannel, |
int | tochannel, | ||
int | start, | ||
int | count, | ||
float ** | buffers | ||
) | const [virtual] |
Get the specified set of samples from given contiguous range of channels of the model in single-precision floating-point format.
Return the number of sample frames actually retrieved.
Implements DenseTimeValueModel.
Definition at line 313 of file WaveFileModel.cpp.
References getChannelCount(), getData(), AudioFileReader::getInterleavedFrames(), AudioFileReader::isOK(), m_reader, and m_startFrame.
int WaveFileModel::getSummaryBlockSize | ( | int | desired | ) | const [virtual] |
Implements RangeSummarisableTimeValueModel.
Definition at line 398 of file WaveFileModel.cpp.
References PowerOfSqrtTwoZoomConstraint::getMinCachePower(), PowerOfSqrtTwoZoomConstraint::getNearestBlockSize(), m_zoomConstraint, and ZoomConstraint::RoundDown.
Referenced by WritableWaveFileModel::getSummaryBlockSize().
void WaveFileModel::getSummaries | ( | int | channel, |
int | start, | ||
int | count, | ||
RangeBlock & | ranges, | ||
int & | blockSize | ||
) | const [virtual] |
Return ranges from the given start frame, corresponding to the given number of underlying sample frames, summarised at the given block size.
duration / blockSize ranges should ideally be returned.
If the given block size is not supported by this model (according to its zoom constraint), also modify the blockSize parameter so as to return the block size that was actually obtained.
Implements RangeSummarisableTimeValueModel.
Definition at line 414 of file WaveFileModel.cpp.
References RangeSummarisableTimeValueModel::Range::absmean(), getChannelCount(), getFrameCount(), AudioFileReader::getInterleavedFrames(), PowerOfSqrtTwoZoomConstraint::getMinCachePower(), PowerOfSqrtTwoZoomConstraint::getNearestBlockSize(), isOK(), m_cache, m_directRead, m_directReadMutex, m_lastDirectReadCount, m_lastDirectReadStart, m_mutex, m_reader, m_startFrame, m_zoomConstraint, RangeSummarisableTimeValueModel::Range::max(), RangeSummarisableTimeValueModel::Range::min(), ZoomConstraint::RoundDown, and SVDEBUG.
Referenced by WritableWaveFileModel::getSummaries(), and getSummary().
WaveFileModel::Range WaveFileModel::getSummary | ( | int | channel, |
int | start, | ||
int | count | ||
) | const [virtual] |
Return the range from the given start frame, corresponding to the given number of underlying sample frames, summarised at a block size equal to the distance between start and end frames.
Implements RangeSummarisableTimeValueModel.
Definition at line 547 of file WaveFileModel.cpp.
References RangeSummarisableTimeValueModel::Range::absmean(), getSummaries(), isOK(), m_startFrame, RangeSummarisableTimeValueModel::Range::max(), RangeSummarisableTimeValueModel::Range::min(), RangeSummarisableTimeValueModel::Range::setAbsmean(), RangeSummarisableTimeValueModel::Range::setMax(), and RangeSummarisableTimeValueModel::Range::setMin().
Referenced by WritableWaveFileModel::getSummary().
QString WaveFileModel::getTypeName | ( | ) | const [inline, virtual] |
Return the type of the model.
For display purposes only.
Reimplemented from RangeSummarisableTimeValueModel.
Definition at line 83 of file WaveFileModel.h.
void WaveFileModel::toXml | ( | QTextStream & | stream, |
QString | indent = "" , |
||
QString | extraAttributes = "" |
||
) | const [virtual] |
Stream this exportable object out to XML on a text stream.
Reimplemented from Model.
Definition at line 808 of file WaveFileModel.cpp.
References XmlExportable::encodeEntities(), and m_path.
void WaveFileModel::fillTimerTimedOut | ( | ) | [protected, slot] |
Definition at line 619 of file WaveFileModel.cpp.
References WaveFileModel::RangeCacheFillThread::getFillExtent(), m_fillThread, m_lastFillExtent, Model::modelChanged(), Model::modelChangedWithin(), and SVDEBUG.
Referenced by fillCache().
void WaveFileModel::cacheFilled | ( | ) | [protected, slot] |
Definition at line 639 of file WaveFileModel.cpp.
References getEndFrame(), m_fillThread, m_lastFillExtent, m_mutex, m_updateTimer, Model::modelChanged(), Model::modelChangedWithin(), Model::ready(), and SVDEBUG.
Referenced by fillCache().
void WaveFileModel::initialize | ( | ) | [protected] |
void WaveFileModel::fillCache | ( | ) | [protected] |
Definition at line 599 of file WaveFileModel.cpp.
References cacheFilled(), fillTimerTimedOut(), m_fillThread, m_mutex, m_updateTimer, Thread::start(), and SVDEBUG.
Referenced by WaveFileModel().
virtual bool DenseTimeValueModel::canPlay | ( | ) | const [inline, virtual, inherited] |
Reimplemented from Playable.
Definition at line 87 of file DenseTimeValueModel.h.
virtual QString DenseTimeValueModel::getDefaultPlayClipId | ( | ) | const [inline, virtual, inherited] |
Reimplemented from Playable.
Definition at line 88 of file DenseTimeValueModel.h.
QString DenseTimeValueModel::toDelimitedDataStringSubset | ( | QString | delimiter, |
int | f0, | ||
int | f1 | ||
) | const [virtual, inherited] |
Reimplemented from Model.
Definition at line 32 of file DenseTimeValueModel.cpp.
References DenseTimeValueModel::getChannelCount(), and DenseTimeValueModel::getData().
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 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().
virtual QString Model::toDelimitedDataString | ( | QString | delimiter | ) | const [inline, virtual, inherited] |
Reimplemented in EditableDenseThreeDimensionalModel, SparseModel< PointType >, SparseModel< FlexiNote >, SparseModel< Note >, SparseModel< PathPoint >, SparseModel< TextPoint >, SparseModel< ImagePoint >, SparseModel< TimeValuePoint >, SparseModel< OneDimensionalPoint >, and SparseModel< RegionRec >.
Definition at line 236 of file Model.h.
References Model::getEndFrame(), Model::getStartFrame(), and Model::toDelimitedDataStringSubset().
Referenced by CSVFileWriter::write().
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(), cacheFilled(), SparseValueModel< RegionRec >::deletePoint(), Dense3DModelPeakCache::Dense3DModelPeakCache(), 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 cacheFilled(), 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 cacheFilled(), 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(), 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::getDefaultPlayAudible | ( | ) | const [inline, virtual, inherited] |
Reimplemented in SparseTimeValueModel.
Definition at line 28 of file Playable.h.
Referenced by PlayParameterRepository::addPlayable().
FileSource WaveFileModel::m_source [protected] |
Definition at line 114 of file WaveFileModel.h.
Referenced by clone(), and WaveFileModel().
QString WaveFileModel::m_path [protected] |
Definition at line 115 of file WaveFileModel.h.
Referenced by toXml(), and WaveFileModel().
AudioFileReader* WaveFileModel::m_reader [protected] |
Definition at line 116 of file WaveFileModel.h.
Referenced by getChannelCount(), getData(), getFrameCount(), getLocation(), getMaker(), getNativeRate(), getSampleRate(), getSummaries(), getTitle(), isOK(), isReady(), WaveFileModel::RangeCacheFillThread::run(), WaveFileModel(), and ~WaveFileModel().
bool WaveFileModel::m_myReader [protected] |
Definition at line 117 of file WaveFileModel.h.
Referenced by ~WaveFileModel().
int WaveFileModel::m_startFrame [protected] |
Definition at line 119 of file WaveFileModel.h.
Referenced by getData(), getEndFrame(), getStartFrame(), getSummaries(), getSummary(), and setStartFrame().
RangeBlock WaveFileModel::m_cache[2] [protected] |
Definition at line 121 of file WaveFileModel.h.
Referenced by getSummaries(), and WaveFileModel::RangeCacheFillThread::run().
QMutex WaveFileModel::m_mutex [mutable, protected] |
Definition at line 122 of file WaveFileModel.h.
Referenced by cacheFilled(), fillCache(), getSummaries(), and WaveFileModel::RangeCacheFillThread::run().
RangeCacheFillThread* WaveFileModel::m_fillThread [protected] |
Definition at line 123 of file WaveFileModel.h.
Referenced by cacheFilled(), fillCache(), fillTimerTimedOut(), isReady(), and ~WaveFileModel().
QTimer* WaveFileModel::m_updateTimer [protected] |
Definition at line 124 of file WaveFileModel.h.
Referenced by cacheFilled(), and fillCache().
int WaveFileModel::m_lastFillExtent [protected] |
Definition at line 125 of file WaveFileModel.h.
Referenced by cacheFilled(), fillTimerTimedOut(), and isReady().
bool WaveFileModel::m_exiting [protected] |
Definition at line 126 of file WaveFileModel.h.
Referenced by WaveFileModel::RangeCacheFillThread::run(), and ~WaveFileModel().
PowerOfSqrtTwoZoomConstraint WaveFileModel::m_zoomConstraint [static, protected] |
Definition at line 127 of file WaveFileModel.h.
Referenced by getSummaries(), getSummaryBlockSize(), getZoomConstraint(), and WaveFileModel::RangeCacheFillThread::run().
SampleBlock WaveFileModel::m_directRead [mutable, protected] |
Definition at line 129 of file WaveFileModel.h.
Referenced by getSummaries().
int WaveFileModel::m_lastDirectReadStart [mutable, protected] |
Definition at line 130 of file WaveFileModel.h.
Referenced by getSummaries().
int WaveFileModel::m_lastDirectReadCount [mutable, protected] |
Definition at line 131 of file WaveFileModel.h.
Referenced by getSummaries().
QMutex WaveFileModel::m_directReadMutex [mutable, protected] |
Definition at line 132 of file WaveFileModel.h.
Referenced by getSummaries().
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().