Mercurial > hg > svcore
comparison data/model/TextModel.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 | 726b32522e3f |
children | 7a4bd2c8585c |
comparison
equal
deleted
inserted
replaced
313:29485aa03da4 | 314:70a232b1f12a |
---|---|
37 | 37 |
38 long frame; | 38 long frame; |
39 float height; | 39 float height; |
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\" height=\"%3\" label=\"%4\" %5/>\n") | 45 stream << QString("%1<point frame=\"%2\" height=\"%3\" label=\"%4\" %5/>\n") |
46 .arg(indent).arg(frame).arg(height) | 46 .arg(indent).arg(frame).arg(height) |
47 .arg(encodeEntities(label)).arg(extraAttributes); | 47 .arg(encodeEntities(label)).arg(extraAttributes); |
48 } | 48 } |
49 | 49 |
50 QString toDelimitedDataString(QString delimiter, size_t sampleRate) const | 50 QString toDelimitedDataString(QString delimiter, size_t sampleRate) const |