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 );
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 User profile contains information about the user profile folders on the machine.
QString rootLocation()
Returns the path to the root profiles location.
QgsError is container for error messages (report).
User profile manager is used to manager list, and manage user profiles on the users machine...