diff main/MainWindow.h @ 88:51be0daa1386

Several changes related to referring to remote URLs for sessions and files: * Pull file dialog wrapper functions out from MainWindow into FileFinder * If a file referred to in a session is not found at its expected location, try a few other alternatives (same location as the session file or same location as the last audio file) before asking the user to locate it * Allow user to give a URL when locating an audio file, not just locate on the filesystem * Make wave file models remember the "original" location (e.g. URL) of the audio file, not just the actual location from which the data was loaded (e.g. local copy of that URL) -- when saving a session, use the original location so as not to refer to a temporary file * Clean up incompletely-downloaded local copies of files
author Chris Cannam
date Thu, 11 Jan 2007 13:29:58 +0000
parents 6113fdda2737
children 51ea003f8f99
line wrap: on
line diff
--- a/main/MainWindow.h	Wed Jan 10 17:26:39 2007 +0000
+++ b/main/MainWindow.h	Thu Jan 11 13:29:58 2007 +0000
@@ -29,6 +29,7 @@
 #include "layer/LayerFactory.h"
 #include "transform/Transform.h"
 #include "document/SVFileReader.h"
+#include "data/fileio/FileFinder.h"
 #include <map>
 
 class Document;
@@ -363,13 +364,6 @@
     virtual void closeEvent(QCloseEvent *e);
     bool checkSaveModified();
 
-    enum FileType {
-        SessionFile,
-        AudioFile,
-        LayerFile,
-        AnyFile
-    };
-
     FileOpenStatus openSomeFile(QString path, QString location,
                                 AudioFileOpenMode = AskUser);
     FileOpenStatus openAudioFile(QString path, QString location,
@@ -377,9 +371,9 @@
     FileOpenStatus openLayerFile(QString path, QString location);
     FileOpenStatus openSessionFile(QString path, QString location);
 
-    QString getOpenFileName(FileType type);
-    QString getSaveFileName(FileType type);
-    void registerLastOpenedFilePath(FileType type, QString path);
+    QString getOpenFileName(FileFinder::FileType type);
+    QString getSaveFileName(FileFinder::FileType type);
+    void registerLastOpenedFilePath(FileFinder::FileType type, QString path);
 
     void createPlayTarget();