comparison 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
comparison
equal deleted inserted replaced
87:8944f3005a15 88:51be0daa1386
27 #include "base/PropertyContainer.h" 27 #include "base/PropertyContainer.h"
28 #include "base/RecentFiles.h" 28 #include "base/RecentFiles.h"
29 #include "layer/LayerFactory.h" 29 #include "layer/LayerFactory.h"
30 #include "transform/Transform.h" 30 #include "transform/Transform.h"
31 #include "document/SVFileReader.h" 31 #include "document/SVFileReader.h"
32 #include "data/fileio/FileFinder.h"
32 #include <map> 33 #include <map>
33 34
34 class Document; 35 class Document;
35 class PaneStack; 36 class PaneStack;
36 class Pane; 37 class Pane;
361 }; 362 };
362 363
363 virtual void closeEvent(QCloseEvent *e); 364 virtual void closeEvent(QCloseEvent *e);
364 bool checkSaveModified(); 365 bool checkSaveModified();
365 366
366 enum FileType {
367 SessionFile,
368 AudioFile,
369 LayerFile,
370 AnyFile
371 };
372
373 FileOpenStatus openSomeFile(QString path, QString location, 367 FileOpenStatus openSomeFile(QString path, QString location,
374 AudioFileOpenMode = AskUser); 368 AudioFileOpenMode = AskUser);
375 FileOpenStatus openAudioFile(QString path, QString location, 369 FileOpenStatus openAudioFile(QString path, QString location,
376 AudioFileOpenMode = AskUser); 370 AudioFileOpenMode = AskUser);
377 FileOpenStatus openLayerFile(QString path, QString location); 371 FileOpenStatus openLayerFile(QString path, QString location);
378 FileOpenStatus openSessionFile(QString path, QString location); 372 FileOpenStatus openSessionFile(QString path, QString location);
379 373
380 QString getOpenFileName(FileType type); 374 QString getOpenFileName(FileFinder::FileType type);
381 QString getSaveFileName(FileType type); 375 QString getSaveFileName(FileFinder::FileType type);
382 void registerLastOpenedFilePath(FileType type, QString path); 376 void registerLastOpenedFilePath(FileFinder::FileType type, QString path);
383 377
384 void createPlayTarget(); 378 void createPlayTarget();
385 379
386 void openHelpUrl(QString url); 380 void openHelpUrl(QString url);
387 381