15 #ifndef QGSUSERPROFILEMANAGER_H
16 #define QGSUSERPROFILEMANAGER_H
19 #include <QFileSystemWatcher>
23 #include "qgis_core.h"
57 static QString resolveProfilesFolder(
const QString &basePath = QString() );
70 QgsUserProfile *getProfile(
const QString &defaultProfile =
"default",
bool createNew =
true,
bool initSettings =
true )
SIP_FACTORY;
77 void setRootLocation(
const QString &rootProfileLocation );
83 QString rootLocation() {
return mRootProfilePath; }
95 void setNewProfileNotificationEnabled(
bool enabled );
104 bool isNewProfileNotificationEnabled()
const;
110 bool rootLocationIsSet()
const;
115 QStringList allProfiles()
const;
121 bool profileExists(
const QString &name )
const;
131 QString defaultProfileName()
const;
138 void setDefaultProfileName(
const QString &name );
143 void setDefaultFromActive();
157 QgsError createUserProfile(
const QString &name );
165 QgsError deleteProfile(
const QString &name );
180 void setActiveUserProfile(
const QString &profile );
186 void loadUserProfile(
const QString &name );
199 void profilesChanged();
203 bool mWatchProfiles =
false;
204 std::unique_ptr<QFileSystemWatcher> mWatcher;
206 QString mRootProfilePath;
208 std::unique_ptr<QgsUserProfile> mUserProfile;
210 QString settingsFile()
const;
212 std::unique_ptr< QSettings > mSettings;
217 #endif // QGSUSERPROFILEMANAGER_H