changeset 1435:365876627fb0 streaming-csv-writer

Add constructor overload for using an optional ProgressReporter
author Lucas Thompson <dev@lucas.im>
date Tue, 17 Apr 2018 10:03:49 +0100
parents 0684c6698e3f
children d61d6c33f14d
files data/fileio/CSVFileWriter.h
diffstat 1 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/data/fileio/CSVFileWriter.h	Tue Apr 17 10:03:49 2018 +0100
+++ b/data/fileio/CSVFileWriter.h	Tue Apr 17 10:03:49 2018 +0100
@@ -23,6 +23,7 @@
 
 class Model;
 class MultiSelection;
+class ProgressReporter;
 
 class CSVFileWriter : public QObject
 {
@@ -33,6 +34,17 @@
                   Model *model,
                   QString delimiter = ",",
                   DataExportOptions options = DataExportDefaults);
+
+    CSVFileWriter(
+        QString path,
+        Model *model,
+        ProgressReporter *reporter,
+        QString delimiter = ",",
+        DataExportOptions options = DataExportDefaults
+    ) : CSVFileWriter(path, model, delimiter, options)
+    {
+        m_reporter = reporter;
+    }
     virtual ~CSVFileWriter();
 
     virtual bool isOK() const;
@@ -47,6 +59,7 @@
     QString m_error;
     QString m_delimiter;
     DataExportOptions m_options;
+    ProgressReporter *m_reporter;
 };
 
 #endif