Mercurial > hg > svcore
comparison data/model/TimeFrequencyBoxModel.h @ 1789:baafe1bb7e51 time-frequency-boxes
Fixes to export of time-frequency box model
| author | Chris Cannam |
|---|---|
| date | Fri, 20 Sep 2019 14:18:38 +0100 |
| parents | a72921e2194f |
| children |
comparison
equal
deleted
inserted
replaced
| 1787:9ab3be243397 | 1789:baafe1bb7e51 |
|---|---|
| 301 QString extraAttributes = "") const override { | 301 QString extraAttributes = "") const override { |
| 302 | 302 |
| 303 Model::toXml | 303 Model::toXml |
| 304 (out, | 304 (out, |
| 305 indent, | 305 indent, |
| 306 QString("type=\"sparse\" dimensions=\"4\" resolution=\"%1\" " | 306 QString("type=\"sparse\" dimensions=\"2\" resolution=\"%1\" " |
| 307 "notifyOnAdd=\"%2\" dataset=\"%3\" subtype=\"%4\" " | 307 "notifyOnAdd=\"%2\" dataset=\"%3\" subtype=\"%4\" " |
| 308 "minimum=\"%5\" maximum=\"%6\" units=\"%7\" %8") | 308 "minimum=\"%5\" maximum=\"%6\" units=\"%7\" %8") |
| 309 .arg(m_resolution) | 309 .arg(m_resolution) |
| 310 .arg("true") // always true after model reaches 100% - | 310 .arg("true") // always true after model reaches 100% - |
| 311 // subsequent events are always notified | 311 // subsequent events are always notified |
| 312 .arg(m_events.getExportId()) | 312 .arg(m_events.getExportId()) |
| 313 .arg("timefrequency") | 313 .arg("timefrequencybox") |
| 314 .arg(m_frequencyMinimum) | 314 .arg(m_frequencyMinimum) |
| 315 .arg(m_frequencyMaximum) | 315 .arg(m_frequencyMaximum) |
| 316 .arg(encodeEntities(m_units)) | 316 .arg(encodeEntities(m_units)) |
| 317 .arg(extraAttributes)); | 317 .arg(extraAttributes)); |
| 318 | 318 |
| 319 m_events.toXml(out, indent, QString("dimensions=\"3\"")); | 319 Event::ExportNameOptions options; |
| 320 options.valueAttributeName = "frequency"; | |
| 321 options.levelAttributeName = "extent"; | |
| 322 | |
| 323 m_events.toXml(out, indent, QString("dimensions=\"2\""), options); | |
| 320 } | 324 } |
| 321 | 325 |
| 322 QString toDelimitedDataString(QString delimiter, | 326 QString toDelimitedDataString(QString delimiter, |
| 323 DataExportOptions options, | 327 DataExportOptions, |
| 324 sv_frame_t startFrame, | 328 sv_frame_t startFrame, |
| 325 sv_frame_t duration) const override { | 329 sv_frame_t duration) const override { |
| 326 | 330 |
| 327 // We need a custom format here | 331 // We need a custom format here |
| 328 | 332 |
