changeset 1779:b660b2fa8411 streaming-csv-writer

Add Lucas's progress dialog change for CSV export
author Chris Cannam
date Mon, 16 Apr 2018 15:23:01 +0100
parents 08eb2053ef37
children dc5923962505
files main/MainWindow.cpp vext-lock.json
diffstat 2 files changed, 12 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/main/MainWindow.cpp	Fri Apr 13 17:19:21 2018 +0100
+++ b/main/MainWindow.cpp	Mon Apr 16 15:23:01 2018 +0100
@@ -58,6 +58,7 @@
 #include "widgets/LabelCounterInputDialog.h"
 #include "widgets/ActivityLog.h"
 #include "widgets/UnitConverter.h"
+#include "widgets/ProgressDialog.h"
 #include "audio/AudioCallbackPlaySource.h"
 #include "audio/AudioCallbackRecordTarget.h"
 #include "audio/PlaySpeedRangeMapper.h"
@@ -2726,11 +2727,19 @@
 
     if (!multiple) {
         if (asData) {
-            CSVFileWriter writer(path, model,
+            stop();
+            ProgressDialog dialog {
+                QObject::tr("Exporting audio data..."),
+                true,
+                0,
+                this,
+                Qt::ApplicationModal
+            };
+            CSVFileWriter writer(path, model, &dialog,
                                  ((QFileInfo(path).suffix() == "csv") ?
                                   "," : "\t"));
             if (selectionToWrite) {
-                writer.writeSelection(selectionToWrite);
+                writer.writeSelection(*selectionToWrite);
             } else {
                 writer.write();
             }
--- a/vext-lock.json	Fri Apr 13 17:19:21 2018 +0100
+++ b/vext-lock.json	Mon Apr 16 15:23:01 2018 +0100
@@ -4,7 +4,7 @@
       "pin": "8742125177ae"
     },
     "svcore": {
-      "pin": "ad6212d5941d6cac5169645cbf0ded94b5afdf37"
+      "pin": "e307514de12763cda52aa77d700196672f2fb904"
     },
     "svgui": {
       "pin": "2256d17de38f1937072d4afae7c0ff326b275a3a"