Mercurial > hg > svgui
comparison widgets/InteractiveFileFinder.h @ 760:d0fd7630d32f tonioni
Make session file extension parameterisable, use .ton for Tony
author | Chris Cannam |
---|---|
date | Wed, 02 Apr 2014 18:22:41 +0100 |
parents | 3228b7913aa4 |
children | 831188672987 |
comparison
equal
deleted
inserted
replaced
759:30bc7b2155dc | 760:d0fd7630d32f |
---|---|
16 #ifndef _INTERACTIVE_FILE_FINDER_H_ | 16 #ifndef _INTERACTIVE_FILE_FINDER_H_ |
17 #define _INTERACTIVE_FILE_FINDER_H_ | 17 #define _INTERACTIVE_FILE_FINDER_H_ |
18 | 18 |
19 #include "data/fileio/FileFinder.h" | 19 #include "data/fileio/FileFinder.h" |
20 | 20 |
21 #include <QApplication> | |
21 #include <QString> | 22 #include <QString> |
22 #include <QObject> | 23 #include <QObject> |
23 | 24 |
24 class InteractiveFileFinder : public QObject, | 25 class InteractiveFileFinder : public QObject, |
25 public FileFinder | 26 public FileFinder |
26 { | 27 { |
27 Q_OBJECT | 28 Q_OBJECT |
28 | 29 |
29 public: | 30 public: |
30 virtual ~InteractiveFileFinder(); | 31 virtual ~InteractiveFileFinder(); |
32 | |
33 /// Specify the extension for this application's session files | |
34 /// (without the dot) | |
35 void setApplicationSessionExtension(QString extension); | |
36 | |
37 QString getApplicationSessionExtension() const { | |
38 return m_sessionExtension; | |
39 } | |
31 | 40 |
32 QString getOpenFileName(FileType type, QString fallbackLocation = ""); | 41 QString getOpenFileName(FileType type, QString fallbackLocation = ""); |
33 QString getSaveFileName(FileType type, QString fallbackLocation = ""); | 42 QString getSaveFileName(FileType type, QString fallbackLocation = ""); |
34 void registerLastOpenedFilePath(FileType type, QString path); | 43 void registerLastOpenedFilePath(FileType type, QString path); |
35 | 44 |
42 static InteractiveFileFinder m_instance; | 51 static InteractiveFileFinder m_instance; |
43 | 52 |
44 QString findRelative(QString location, QString relativeTo); | 53 QString findRelative(QString location, QString relativeTo); |
45 QString locateInteractive(FileType type, QString thing); | 54 QString locateInteractive(FileType type, QString thing); |
46 | 55 |
56 QString m_sessionExtension; | |
47 QString m_lastLocatedLocation; | 57 QString m_lastLocatedLocation; |
48 }; | 58 }; |
49 | 59 |
50 #endif | 60 #endif |
51 | 61 |