1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00
qTox/src/persistence/paths.h
sudden6 3ee8c665df
feat(paths): create class to combine all qTox managed paths
This will be the central location for all of qTox managed directories.
2018-11-14 11:02:17 +01:00

36 lines
807 B
C++

#ifndef PATHS_H
#define PATHS_H
#include <QString>
#include <QStringList>
class Paths
{
public:
enum class Portable {
Auto, /** Auto detect if portable or non-portable */
Portable, /** Force portable mode */
NonPortable /** Force non-portable mode */
};
static Paths* makePaths(Portable mode = Portable::Auto);
bool isPortable() const;
QString getGlobalSettingsPath() const;
QString getProfilesDir() const;
QString getToxSaveDir() const;
QString getAvatarsDir() const;
QString getTransfersDir() const;
QStringList getThemeDirs() const;
QString getScreenshotsDir() const;
private:
Paths(const QString &basePath, bool portable);
private:
QString basePath{};
bool portable = false;
};
#endif // PATHS_H