diff data/fileio/QuickTimeFileReader.h @ 392:183ee2a55fc7

* More work to abstract out interactive components used in the data library, so that it does not need to depend on QtGui.
author Chris Cannam
date Fri, 14 Mar 2008 17:14:21 +0000
parents 700cd3350391
children f3cda3280398 59e7fe1b1003
line wrap: on
line diff
--- a/data/fileio/QuickTimeFileReader.h	Thu Mar 13 14:06:03 2008 +0000
+++ b/data/fileio/QuickTimeFileReader.h	Fri Mar 14 17:14:21 2008 +0000
@@ -27,20 +27,23 @@
 
 #include <set>
 
-class QProgressDialog;
+class ProgressReporter;
 
 class QuickTimeFileReader : public CodedAudioFileReader
 {
+    Q_OBJECT
+
 public:
     enum DecodeMode {
-        DecodeAtOnce, // decode the file on construction, with progress dialog
+        DecodeAtOnce, // decode the file on construction, with progress
         DecodeThreaded // decode in a background thread after construction
     };
 
     QuickTimeFileReader(FileSource source,
                         DecodeMode decodeMode,
                         CacheMode cacheMode,
-                        size_t targetRate = 0);
+                        size_t targetRate = 0,
+                        ProgressReporter *reporter = 0);
     virtual ~QuickTimeFileReader();
 
     virtual QString getError() const { return m_error; }
@@ -58,6 +61,9 @@
         return m_decodeThread && m_decodeThread->isRunning();
     }
 
+public slots:
+    void cancelled();
+
 protected:
     FileSource m_source;
     QString m_path;
@@ -67,7 +73,7 @@
     class D;
     D *m_d;
 
-    QProgressDialog *m_progress;
+    ProgressReporter *m_reporter;
     bool m_cancelled;
     int m_completion;