# HG changeset patch # User Chris Cannam # Date 1187099933 0 # Node ID 7b96b3bd4bae63a486dca3aadf4c949b358b75db # Parent 557e00480279dbf7fac3d22858cde60fd6bff839 * Fix #1757772 tempo, dynamic related plug-ins bug -- make auto-align only auto-align if there is a unit involved * Fix #1755366 text layer bug in retrieved session * Fix input model selection in plugin parameter dialog (was being ignored) * Use lighter background than the standard widget one for panes (assuming the widget background is light but not white) -- similarly darker if dark * Fix colour reference counting in loaded session in SingleColourLayer * Reset overview pane colour when switching dark background on or off diff -r 557e00480279 -r 7b96b3bd4bae data/model/Model.cpp --- a/data/model/Model.cpp Mon Aug 13 14:51:35 2007 +0000 +++ b/data/model/Model.cpp Tue Aug 14 13:58:53 2007 +0000 @@ -51,16 +51,11 @@ Model::toXmlString(QString indent, QString extraAttributes) const { QString s; - - s += indent; - s += QString("\n") - .arg(getObjectExportId(this)) - .arg(encodeEntities(objectName())) - .arg(getSampleRate()) - .arg(getStartFrame()) - .arg(getEndFrame()) - .arg(extraAttributes); + { + QTextStream out(&s); + toXml(out, indent, extraAttributes); + } return s; } diff -r 557e00480279 -r 7b96b3bd4bae data/model/NoteModel.h --- a/data/model/NoteModel.h Mon Aug 13 14:51:35 2007 +0000 +++ b/data/model/NoteModel.h Tue Aug 14 13:58:53 2007 +0000 @@ -120,11 +120,13 @@ */ virtual PointList getPoints(long frame) const; - virtual QString toXmlString(QString indent = "", - QString extraAttributes = "") const + virtual void toXml(QTextStream &out, + QString indent = "", + QString extraAttributes = "") const { - return SparseValueModel::toXmlString - (indent, + return SparseValueModel::toXml + (out, + indent, QString("%1 valueQuantization=\"%2\"") .arg(extraAttributes).arg(m_valueQuantization)); } diff -r 557e00480279 -r 7b96b3bd4bae data/model/TextModel.h --- a/data/model/TextModel.h Mon Aug 13 14:51:35 2007 +0000 +++ b/data/model/TextModel.h Tue Aug 14 13:58:53 2007 +0000 @@ -81,11 +81,13 @@ SparseModel(sampleRate, resolution, notifyOnAdd) { } - virtual QString toXmlString(QString indent = "", - QString extraAttributes = "") const + virtual void toXml(QTextStream &out, + QString indent = "", + QString extraAttributes = "") const { - return SparseModel::toXmlString - (indent, + SparseModel::toXml + (out, + indent, QString("%1 subtype=\"text\"") .arg(extraAttributes)); } diff -r 557e00480279 -r 7b96b3bd4bae data/model/WaveFileModel.cpp --- a/data/model/WaveFileModel.cpp Mon Aug 13 14:51:35 2007 +0000 +++ b/data/model/WaveFileModel.cpp Tue Aug 14 13:58:53 2007 +0000 @@ -618,12 +618,4 @@ .arg(encodeEntities(m_path)).arg(extraAttributes)); } -QString -WaveFileModel::toXmlString(QString indent, - QString extraAttributes) const -{ - return Model::toXmlString(indent, - QString("type=\"wavefile\" file=\"%1\" %2") - .arg(encodeEntities(m_path)).arg(extraAttributes)); -} diff -r 557e00480279 -r 7b96b3bd4bae data/model/WaveFileModel.h --- a/data/model/WaveFileModel.h Mon Aug 13 14:51:35 2007 +0000 +++ b/data/model/WaveFileModel.h Tue Aug 14 13:58:53 2007 +0000 @@ -70,9 +70,6 @@ QString indent = "", QString extraAttributes = "") const; - virtual QString toXmlString(QString indent = "", - QString extraAttributes = "") const; - signals: void modelChanged(); void modelChanged(size_t, size_t); diff -r 557e00480279 -r 7b96b3bd4bae data/model/WritableWaveFileModel.cpp --- a/data/model/WritableWaveFileModel.cpp Mon Aug 13 14:51:35 2007 +0000 +++ b/data/model/WritableWaveFileModel.cpp Tue Aug 14 13:58:53 2007 +0000 @@ -211,15 +211,3 @@ .arg(m_writer->getPath()).arg(m_model->getChannelCount()).arg(extraAttributes)); } -QString -WritableWaveFileModel::toXmlString(QString indent, - QString extraAttributes) const -{ - // As above. - - return Model::toXmlString - (indent, - QString("type=\"writablewavefile\" file=\"%1\" channels=\"%2\" %3") - .arg(m_writer->getPath()).arg(m_model->getChannelCount()).arg(extraAttributes)); -} - diff -r 557e00480279 -r 7b96b3bd4bae data/model/WritableWaveFileModel.h --- a/data/model/WritableWaveFileModel.h Mon Aug 13 14:51:35 2007 +0000 +++ b/data/model/WritableWaveFileModel.h Tue Aug 14 13:58:53 2007 +0000 @@ -75,9 +75,6 @@ QString indent = "", QString extraAttributes = "") const; - virtual QString toXmlString(QString indent = "", - QString extraAttributes = "") const; - protected: WaveFileModel *m_model; WavFileWriter *m_writer;