| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
#ifndef SNAPSTANDARDPATHS_H |
| 19 |
#define SNAPSTANDARDPATHS_H |
| 20 |
|
| 21 |
#include <QStringList> |
| 22 |
|
| 23 |
class Q_CORE_EXPORT SnapStandardPaths |
| 24 |
{ |
| 25 |
public: |
| 26 |
|
| 27 |
enum StandardLocation { |
| 28 |
HomeLocation, |
| 29 |
CommonHomeLocation, |
| 30 |
CacheLocation, |
| 31 |
CommonCacheLocation, |
| 32 |
AppCacheLocation, |
| 33 |
CommonAppCacheLocation, |
| 34 |
DataLocation, |
| 35 |
CommonDataLocation, |
| 36 |
AppDataLocation, |
| 37 |
CommonAppDataLocation, |
| 38 |
ConfigLocation, |
| 39 |
CommonConfigLocation, |
| 40 |
AppConfigLocation, |
| 41 |
CommonAppConfigLocation |
| 42 |
}; |
| 43 |
|
| 44 |
enum LocateOption { |
| 45 |
LocateFile = 0x0, |
| 46 |
LocateDirectory = 0x1 |
| 47 |
}; |
| 48 |
Q_DECLARE_FLAGS(LocateOptions, LocateOption) |
| 49 |
|
| 50 |
static QString writableLocation(StandardLocation location); |
| 51 |
static QStringList standardLocations(StandardLocation location); |
| 52 |
|
| 53 |
static void setTestModeEnabled(bool testMode); |
| 54 |
static bool isTestModeEnabled(); |
| 55 |
|
| 56 |
private: |
| 57 |
|
| 58 |
SnapStandardPaths(); |
| 59 |
~SnapStandardPaths(); |
| 60 |
}; |
| 61 |
|
| 62 |
#endif |