Mercurial > hg > sonic-visualiser
comparison main/MainWindow.h @ 197:c08c312b2399
* Make RemoteFile far more pervasive, and use it for local files as well
so that we can handle both transparently. Make it shallow copy with
reference counting, so it can be used by value without having to worry
about the cache file lifetime. Use RemoteFile for MainWindow file-open
functions, etc
author | Chris Cannam |
---|---|
date | Thu, 18 Oct 2007 15:31:20 +0000 |
parents | c851c49c79fe |
children | 24ac2e4010c5 |
comparison
equal
deleted
inserted
replaced
196:29c356da4ae4 | 197:c08c312b2399 |
---|---|
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 "data/fileio/FileFinder.h" |
33 #include "data/fileio/RemoteFile.h" | |
33 #include <map> | 34 #include <map> |
34 | 35 |
35 class Document; | 36 class Document; |
36 class PaneStack; | 37 class PaneStack; |
37 class Pane; | 38 class Pane; |
78 FileOpenFailed, | 79 FileOpenFailed, |
79 FileOpenCancelled, | 80 FileOpenCancelled, |
80 FileOpenWrongMode // attempted to open layer when no main model present | 81 FileOpenWrongMode // attempted to open layer when no main model present |
81 }; | 82 }; |
82 | 83 |
83 FileOpenStatus openSomeFile(QString path, AudioFileOpenMode = AskUser); | 84 FileOpenStatus open(QString fileOrUrl, AudioFileOpenMode = AskUser); |
84 FileOpenStatus openAudioFile(QString path, AudioFileOpenMode = AskUser); | 85 FileOpenStatus open(RemoteFile source, AudioFileOpenMode = AskUser); |
85 FileOpenStatus openPlaylistFile(QString path, AudioFileOpenMode = AskUser); | 86 |
86 FileOpenStatus openLayerFile(QString path); | 87 FileOpenStatus openAudio(RemoteFile source, AudioFileOpenMode = AskUser); |
87 FileOpenStatus openImageFile(QString path); | 88 FileOpenStatus openPlaylist(RemoteFile source, AudioFileOpenMode = AskUser); |
88 FileOpenStatus openSessionFile(QString path); | 89 FileOpenStatus openLayer(RemoteFile source); |
89 FileOpenStatus openURL(QUrl url, AudioFileOpenMode = AskUser); | 90 FileOpenStatus openImage(RemoteFile source); |
90 FileOpenStatus openURL(QString url, AudioFileOpenMode = AskUser); | 91 FileOpenStatus openSession(RemoteFile source); |
91 | 92 |
92 bool saveSessionFile(QString path); | 93 bool saveSessionFile(QString path); |
93 bool commitData(bool mayAskUser); // on session shutdown | 94 bool commitData(bool mayAskUser); // on session shutdown |
94 | 95 |
95 signals: | 96 signals: |
427 }; | 428 }; |
428 | 429 |
429 virtual void closeEvent(QCloseEvent *e); | 430 virtual void closeEvent(QCloseEvent *e); |
430 bool checkSaveModified(); | 431 bool checkSaveModified(); |
431 | 432 |
432 FileOpenStatus openSomeFile(QString path, QString location, | |
433 AudioFileOpenMode = AskUser); | |
434 FileOpenStatus openAudioFile(QString path, QString location, | |
435 AudioFileOpenMode = AskUser); | |
436 FileOpenStatus openPlaylistFile(QString path, QString location, | |
437 AudioFileOpenMode = AskUser); | |
438 FileOpenStatus openLayerFile(QString path, QString location); | |
439 FileOpenStatus openImageFile(QString path, QString location); | |
440 FileOpenStatus openSessionFile(QString path, QString location); | |
441 | |
442 QString getOpenFileName(FileFinder::FileType type); | 433 QString getOpenFileName(FileFinder::FileType type); |
443 QString getSaveFileName(FileFinder::FileType type); | 434 QString getSaveFileName(FileFinder::FileType type); |
444 void registerLastOpenedFilePath(FileFinder::FileType type, QString path); | 435 void registerLastOpenedFilePath(FileFinder::FileType type, QString path); |
445 | 436 |
446 void createPlayTarget(); | 437 void createPlayTarget(); |