diff data/model/DenseTimeValueModel.cpp @ 1815:c546429d4c2f

Add optional ability to write a header on delimited data output, & to write times in frames
author Chris Cannam
date Fri, 10 Jan 2020 14:29:54 +0000
parents 77543124651b
children 21c792334c2e
line wrap: on
line diff
--- a/data/model/DenseTimeValueModel.cpp	Wed Jan 08 15:26:49 2020 +0000
+++ b/data/model/DenseTimeValueModel.cpp	Fri Jan 10 14:29:54 2020 +0000
@@ -16,7 +16,19 @@
 #include "DenseTimeValueModel.h"
 
 #include <QStringList>
-        
+
+QString
+DenseTimeValueModel::getDelimitedDataHeaderLine(QString delimiter,
+                                                DataExportOptions) const
+{
+    int ch = getChannelCount();
+    QStringList list;
+    for (int i = 0; i < ch; ++i) {
+        list << QString("Channel%1").arg(i+1);
+    }
+    return list.join(delimiter);
+}
+
 QString
 DenseTimeValueModel::toDelimitedDataString(QString delimiter,
                                            DataExportOptions,