Mercurial > hg > svcore
diff data/model/NoteModel.h @ 314:70a232b1f12a
* Make XmlExportable::toXml the function that is universally overridden (and
pure virtual) instead of toXmlString. Tidies up some classes, notably the
model classes, significantly. Closes #1794561.
author | Chris Cannam |
---|---|
date | Thu, 18 Oct 2007 10:15:07 +0000 |
parents | 7b96b3bd4bae |
children | 7a4bd2c8585c |
line wrap: on
line diff
--- a/data/model/NoteModel.h Wed Oct 17 12:58:45 2007 +0000 +++ b/data/model/NoteModel.h Thu Oct 18 10:15:07 2007 +0000 @@ -43,10 +43,12 @@ size_t duration; QString label; - QString toXmlString(QString indent = "", - QString extraAttributes = "") const + void toXml(QTextStream &stream, + QString indent = "", + QString extraAttributes = "") const { - return QString("%1<point frame=\"%2\" value=\"%3\" duration=\"%4\" label=\"%5\" %6/>\n") + stream << + QString("%1<point frame=\"%2\" value=\"%3\" duration=\"%4\" label=\"%5\" %6/>\n") .arg(indent).arg(frame).arg(value).arg(duration).arg(label).arg(extraAttributes); } @@ -124,7 +126,7 @@ QString indent = "", QString extraAttributes = "") const { - return SparseValueModel<Note>::toXml + SparseValueModel<Note>::toXml (out, indent, QString("%1 valueQuantization=\"%2\"")