Mercurial > hg > svcore
comparison data/model/NoteModel.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 |
---|---|
60 QString("%1<point frame=\"%2\" value=\"%3\" duration=\"%4\" level=\"%5\" label=\"%6\" %7/>\n") | 60 QString("%1<point frame=\"%2\" value=\"%3\" duration=\"%4\" level=\"%5\" label=\"%6\" %7/>\n") |
61 .arg(indent).arg(frame).arg(value).arg(duration).arg(level) | 61 .arg(indent).arg(frame).arg(value).arg(duration).arg(level) |
62 .arg(XmlExportable::encodeEntities(label)).arg(extraAttributes); | 62 .arg(XmlExportable::encodeEntities(label)).arg(extraAttributes); |
63 } | 63 } |
64 | 64 |
65 QString toDelimitedDataString(QString delimiter, sv_samplerate_t sampleRate) const | 65 QString toDelimitedDataString(QString delimiter, DataExportOptions opts, sv_samplerate_t sampleRate) const { |
66 { | |
67 QStringList list; | 66 QStringList list; |
68 list << RealTime::frame2RealTime(frame, sampleRate).toString().c_str(); | 67 list << RealTime::frame2RealTime(frame, sampleRate).toString().c_str(); |
69 list << QString("%1").arg(value); | 68 list << QString("%1").arg(value); |
70 list << RealTime::frame2RealTime(duration, sampleRate).toString().c_str(); | 69 list << RealTime::frame2RealTime(duration, sampleRate).toString().c_str(); |
71 list << QString("%1").arg(level); | 70 if (!(opts & DataExportOmitLevels)) { |
71 list << QString("%1").arg(level); | |
72 } | |
72 if (label != "") list << label; | 73 if (label != "") list << label; |
73 return list.join(delimiter); | 74 return list.join(delimiter); |
74 } | 75 } |
75 | 76 |
76 struct Comparator { | 77 struct Comparator { |