diff data/fileio/CSVFileReader.h @ 1527:710e6250a401 zoom

Merge from default branch
author Chris Cannam
date Mon, 17 Sep 2018 13:51:14 +0100
parents fbe8afdfa8a6
children c01cbe41aeb5
line wrap: on
line diff
--- a/data/fileio/CSVFileReader.h	Mon Dec 12 15:18:52 2016 +0000
+++ b/data/fileio/CSVFileReader.h	Mon Sep 17 13:51:14 2018 +0100
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _CSV_FILE_READER_H_
-#define _CSV_FILE_READER_H_
+#ifndef SV_CSV_FILE_READER_H
+#define SV_CSV_FILE_READER_H
 
 #include "DataFileReader.h"
 
@@ -27,6 +27,7 @@
 #include <QIODevice>
 
 class QFile;
+class ProgressReporter;
 
 class CSVFileReader : public DataFileReader
 {
@@ -35,7 +36,9 @@
      * Construct a CSVFileReader to read the CSV file at the given
      * path, with the given format.
      */
-    CSVFileReader(QString path, CSVFormat format, sv_samplerate_t mainModelSampleRate);
+    CSVFileReader(QString path, CSVFormat format,
+                  sv_samplerate_t mainModelSampleRate,
+                  ProgressReporter *reporter = 0);
 
     /**
      * Construct a CSVFileReader to read from the given
@@ -43,7 +46,9 @@
      * CSVFileReader will not close or delete it and it must outlive
      * the CSVFileReader.
      */
-    CSVFileReader(QIODevice *device, CSVFormat format, sv_samplerate_t mainModelSampleRate);
+    CSVFileReader(QIODevice *device, CSVFormat format,
+                  sv_samplerate_t mainModelSampleRate,
+                  ProgressReporter *reporter = 0);
 
     virtual ~CSVFileReader();
 
@@ -60,9 +65,15 @@
     QString m_error;
     mutable int m_warnings;
     sv_samplerate_t m_mainModelSampleRate;
+    qint64 m_fileSize;
+    mutable qint64 m_readCount;
+    mutable int m_progress;
+    ProgressReporter *m_reporter;
 
     sv_frame_t convertTimeValue(QString, int lineno, sv_samplerate_t sampleRate,
                                 int windowSize) const;
+
+    QString getConvertedAudioFilePath() const;
 };