Mercurial > hg > svcore
diff data/fileio/CSVFileWriter.h @ 1453:4b496a258782
Merge from branch streaming-csv-writer
author | Chris Cannam |
---|---|
date | Tue, 17 Apr 2018 10:52:06 +0100 |
parents | 6e9615bde1f9 |
children |
line wrap: on
line diff
--- a/data/fileio/CSVFileWriter.h Thu Mar 01 18:02:22 2018 +0000 +++ b/data/fileio/CSVFileWriter.h Tue Apr 17 10:52:06 2018 +0100 @@ -13,8 +13,8 @@ COPYING included with this distribution for more information. */ -#ifndef _CSV_FILE_WRITER_H_ -#define _CSV_FILE_WRITER_H_ +#ifndef SV_CSV_FILE_WRITER_H +#define SV_CSV_FILE_WRITER_H #include <QObject> #include <QString> @@ -23,6 +23,7 @@ class Model; class MultiSelection; +class ProgressReporter; class CSVFileWriter : public QObject { @@ -33,13 +34,23 @@ 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; virtual QString getError() const; virtual void write(); - virtual void writeSelection(MultiSelection *selection); + virtual void writeSelection(MultiSelection selection); protected: QString m_path; @@ -47,6 +58,7 @@ QString m_error; QString m_delimiter; DataExportOptions m_options; + ProgressReporter *m_reporter = nullptr; }; #endif