diff base/Event.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 9ab3be243397
children 8c34ecba70df
line wrap: on
line diff
--- a/base/Event.h	Fri Sep 20 11:35:14 2019 +0100
+++ b/base/Event.h	Fri Sep 20 14:18:38 2019 +0100
@@ -259,10 +259,12 @@
     struct ExportNameOptions {
 
         ExportNameOptions() :
-            valueAtttributeName("value"),
+            valueAttributeName("value"),
+            levelAttributeName("level"),
             uriAttributeName("uri") { }
 
-        QString valueAtttributeName;
+        QString valueAttributeName;
+        QString levelAttributeName;
         QString uriAttributeName;
     };
     
@@ -275,13 +277,15 @@
         stream << indent << QString("<point frame=\"%1\" ").arg(m_frame);
         if (m_haveValue) {
             stream << QString("%1=\"%2\" ")
-                .arg(opts.valueAtttributeName).arg(m_value);
+                .arg(opts.valueAttributeName).arg(m_value);
         }
         if (m_haveDuration) {
             stream << QString("duration=\"%1\" ").arg(m_duration);
         }
         if (m_haveLevel) {
-            stream << QString("level=\"%1\" ").arg(m_level);
+            stream << QString("%1=\"%2\" ")
+                .arg(opts.levelAttributeName)
+                .arg(m_level);
         }
         if (m_haveReferenceFrame) {
             stream << QString("referenceFrame=\"%1\" ")