summaryrefslogtreecommitdiff
path: root/dgedit/audioextractor.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2014-04-17 09:25:03 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2014-04-17 09:25:03 +0200
commit4daa3f6dac734ae9277159a1ae895006819887e5 (patch)
tree2915e6cba967aff8cf908693f2e6179934d551b7 /dgedit/audioextractor.cc
parent02119553f51d418ebb6473f49784487fa954b50c (diff)
Make threshold slider generate new selections while moving. Add progressbar to export.
Diffstat (limited to 'dgedit/audioextractor.cc')
-rw-r--r--dgedit/audioextractor.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/dgedit/audioextractor.cc b/dgedit/audioextractor.cc
index 5e37312..4250afb 100644
--- a/dgedit/audioextractor.cc
+++ b/dgedit/audioextractor.cc
@@ -29,6 +29,7 @@
#include <QDomDocument>
#include <QFile>
#include <QDir>
+#include <QApplication>
#include <sndfile.h>
@@ -44,6 +45,11 @@ AudioExtractor::AudioExtractor(Selections &s, QObject *parent)
void AudioExtractor::exportSelections()
{
+ emit setMaximumProgress(selections.ids().size());
+ int progress = 0;
+ emit progressUpdate(progress++);
+ qApp->processEvents();
+
// Open all input audio files:
audiodata_t audiodata[audiofiles.size()];
@@ -137,6 +143,9 @@ void AudioExtractor::exportSelections()
idx++;
si++;
+
+ emit progressUpdate(progress++);
+ qApp->processEvents();
}
// Close all input audio files: