Mercurial > hg > svcore
comparison data/model/FlexiNoteModel.h @ 1060:57633d605547 tonioni
Add data export options (not all implemented yet)
author | Chris Cannam |
---|---|
date | Mon, 30 Mar 2015 17:27:25 +0100 |
parents | a1cd5abcb38b |
children | 48e9f538e6e9 |
comparison
equal
deleted
inserted
replaced
1059:7598a78cf915 | 1060:57633d605547 |
---|---|
64 QString("%1<point frame=\"%2\" value=\"%3\" duration=\"%4\" level=\"%5\" label=\"%6\" %7/>\n") | 64 QString("%1<point frame=\"%2\" value=\"%3\" duration=\"%4\" level=\"%5\" label=\"%6\" %7/>\n") |
65 .arg(indent).arg(frame).arg(value).arg(duration).arg(level) | 65 .arg(indent).arg(frame).arg(value).arg(duration).arg(level) |
66 .arg(XmlExportable::encodeEntities(label)).arg(extraAttributes); | 66 .arg(XmlExportable::encodeEntities(label)).arg(extraAttributes); |
67 } | 67 } |
68 | 68 |
69 QString toDelimitedDataString(QString delimiter, sv_samplerate_t sampleRate) const | 69 QString toDelimitedDataString(QString delimiter, DataExportOptions opts, sv_samplerate_t sampleRate) const |
70 { | 70 { |
71 QStringList list; | 71 QStringList list; |
72 list << RealTime::frame2RealTime(frame, sampleRate).toString().c_str(); | 72 list << RealTime::frame2RealTime(frame, sampleRate).toString().c_str(); |
73 list << QString("%1").arg(value); | 73 list << QString("%1").arg(value); |
74 list << RealTime::frame2RealTime(duration, sampleRate).toString().c_str(); | 74 list << RealTime::frame2RealTime(duration, sampleRate).toString().c_str(); |
75 list << QString("%1").arg(level); | 75 if (!(opts & DataExportOmitLevels)) { |
76 list << QString("%1").arg(level); | |
77 } | |
76 if (label != "") list << label; | 78 if (label != "") list << label; |
77 return list.join(delimiter); | 79 return list.join(delimiter); |
78 } | 80 } |
79 | 81 |
80 struct Comparator { | 82 struct Comparator { |