comparison data/model/SparseTimeValueModel.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 9c85517ff0f5
children 7a4bd2c8585c
comparison
equal deleted inserted replaced
313:29485aa03da4 314:70a232b1f12a
37 37
38 long frame; 38 long frame;
39 float value; 39 float value;
40 QString label; 40 QString label;
41 41
42 QString toXmlString(QString indent = "", 42 void toXml(QTextStream &stream, QString indent = "",
43 QString extraAttributes = "") const 43 QString extraAttributes = "") const
44 { 44 {
45 return QString("%1<point frame=\"%2\" value=\"%3\" label=\"%4\" %5/>\n") 45 stream << QString("%1<point frame=\"%2\" value=\"%3\" label=\"%4\" %5/>\n")
46 .arg(indent).arg(frame).arg(value).arg(label).arg(extraAttributes); 46 .arg(indent).arg(frame).arg(value).arg(label).arg(extraAttributes);
47 } 47 }
48 48
49 QString toDelimitedDataString(QString delimiter, size_t sampleRate) const 49 QString toDelimitedDataString(QString delimiter, size_t sampleRate) const
50 { 50 {