diff data/fileio/CSVFileWriter.cpp @ 1063:074d7c51e973 tonioni

Wire options into CSVFileWriter; omit levels from Tony note export
author Chris Cannam
date Tue, 31 Mar 2015 11:05:02 +0100
parents cc27f35aa75c
children e22bfe8ca248
line wrap: on
line diff
--- a/data/fileio/CSVFileWriter.cpp	Tue Mar 31 10:39:54 2015 +0100
+++ b/data/fileio/CSVFileWriter.cpp	Tue Mar 31 11:05:02 2015 +0100
@@ -28,11 +28,15 @@
 #include <QFile>
 #include <QTextStream>
 
-CSVFileWriter::CSVFileWriter(QString path, Model *model, QString delimiter) :
+CSVFileWriter::CSVFileWriter(QString path,
+                             Model *model,
+                             QString delimiter,
+                             DataExportOptions options) :
     m_path(path),
     m_model(model),
     m_error(""),
-    m_delimiter(delimiter)
+    m_delimiter(delimiter),
+    m_options(options)
 {
 }
 
@@ -66,7 +70,8 @@
         }
     
         QTextStream out(&file);
-        out << m_model->toDelimitedDataString(m_delimiter);
+        out << m_model->toDelimitedDataStringWithOptions
+            (m_delimiter, m_options);
 
         file.close();
         temp.moveToTarget();
@@ -96,7 +101,8 @@
              i != selection->getSelections().end(); ++i) {
 	
             sv_frame_t f0(i->getStartFrame()), f1(i->getEndFrame());
-            out << m_model->toDelimitedDataStringSubset(m_delimiter, f0, f1);
+            out << m_model->toDelimitedDataStringSubsetWithOptions
+                (m_delimiter, m_options, f0, f1);
         }
 
         file.close();