diff data/fileio/CSVFileWriter.cpp @ 1069:32ab6c48efaa

Merge from branch tonioni
author Chris Cannam
date Mon, 20 Apr 2015 09:11:34 +0100
parents 074d7c51e973
children e22bfe8ca248
line wrap: on
line diff
--- a/data/fileio/CSVFileWriter.cpp	Mon Mar 02 17:21:34 2015 +0000
+++ b/data/fileio/CSVFileWriter.cpp	Mon Apr 20 09:11:34 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();
@@ -95,8 +100,9 @@
                  selection->getSelections().begin();
              i != selection->getSelections().end(); ++i) {
 	
-            int f0(i->getStartFrame()), f1(i->getEndFrame());
-            out << m_model->toDelimitedDataStringSubset(m_delimiter, f0, f1);
+            sv_frame_t f0(i->getStartFrame()), f1(i->getEndFrame());
+            out << m_model->toDelimitedDataStringSubsetWithOptions
+                (m_delimiter, m_options, f0, f1);
         }
 
         file.close();