19 #include <QTextStream> 30 SVDEBUG <<
"NOTE: Model::~Model(" <<
this <<
", \"" 31 << objectName() <<
"\"): Model deleted " 32 <<
"with no aboutToDelete notification" << endl;
65 cerr <<
"WARNING: Model(" <<
this <<
", \"" 66 << objectName() <<
"\")::aboutToDelete: " 67 <<
"aboutToDelete called more than once for the same model" 130 else return refFrame;
175 QString extraAttributes)
const 178 stream << QString(
"<model id=\"%1\" name=\"%2\" sampleRate=\"%3\" start=\"%4\" end=\"%5\" %6/>\n")
184 .arg(extraAttributes);
void aboutToBeDeleted()
Emitted when something notifies this model (through calling aboutToDelete() that it is about to delet...
virtual QString getMaker() const
Return the "artist" or "maker" of the model, if known.
int fromReference(int frame) const
static const int COMPLETION_UNKNOWN
virtual int getStartFrame() const =0
Return the first audio frame spanned by the model.
AlignmentModel * m_alignment
void completionChanged()
Emitted when some internal processing has advanced a stage, but the model has not changed externally.
static int getObjectExportId(const void *)
int toReference(int frame) const
virtual QString getLocation() const
Return the location of the data in this model (e.g.
void alignmentCompletionChanged()
Emitted when the completion percentage changes for the calculation of this model's alignment model.
virtual void toXml(QTextStream &stream, QString indent="", QString extraAttributes="") const
Stream this exportable object out to XML on a text stream.
static QString encodeEntities(QString)
virtual const AlignmentModel * getAlignment() const
Retrieve the alignment model for this model.
virtual void setSourceModel(Model *model)
Set the source model for 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 mod...
virtual void setAlignment(AlignmentModel *alignment)
Specify an aligment between this model's timeline and that of a reference model.
virtual int getSampleRate() const =0
Return the frame rate in frames per second.
Model is the base class for all data models that represent any sort of data on a time scale based on ...
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 capabl...
virtual int alignToReference(int frame) const
Return the frame number of the reference model that corresponds to the given frame number in this mod...
virtual int getEndFrame() const =0
Return the last audio frame spanned by the model.
virtual QString getTitle() const
Return the "work title" of the model, if known.
void sourceModelAboutToBeDeleted()
virtual const Model * getAlignmentReference() const
Return the reference model for the current alignment timeline, if any.
const Model * getReferenceModel() const
virtual int getAlignmentCompletion() const
Return the completion percentage for the alignment model: 100 if there is no alignment model or it ha...