Mercurial > hg > svcore
comparison data/model/SparseOneDimensionalModel.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 | 4b2ea82fd0ed |
children | 7a4bd2c8585c |
comparison
equal
deleted
inserted
replaced
313:29485aa03da4 | 314:70a232b1f12a |
---|---|
29 int getDimensions() const { return 1; } | 29 int getDimensions() const { return 1; } |
30 | 30 |
31 long frame; | 31 long frame; |
32 QString label; | 32 QString label; |
33 | 33 |
34 QString toXmlString(QString indent = "", | 34 void toXml(QTextStream &stream, |
35 QString extraAttributes = "") const | 35 QString indent = "", |
36 QString extraAttributes = "") const | |
36 { | 37 { |
37 return QString("%1<point frame=\"%2\" label=\"%3\" %4/>\n") | 38 stream << QString("%1<point frame=\"%2\" label=\"%3\" %4/>\n") |
38 .arg(indent).arg(frame).arg(label).arg(extraAttributes); | 39 .arg(indent).arg(frame).arg(label).arg(extraAttributes); |
39 } | 40 } |
40 | 41 |
41 QString toDelimitedDataString(QString delimiter, size_t sampleRate) const | 42 QString toDelimitedDataString(QString delimiter, size_t sampleRate) const |
42 { | 43 { |