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;
116 QStringList allProfiles()
const;
122 bool profileExists(
const QString &name )
const;
132 QString defaultProfileName()
const;
139 void setDefaultProfileName(
const QString &name );
144 void setDefaultFromActive();
158 QgsError createUserProfile(
const QString &name );
166 QgsError deleteProfile(
const QString &name );
181 void setActiveUserProfile(
const QString &profile );
187 void loadUserProfile(
const QString &name );
200 void profilesChanged();
204 bool mWatchProfiles =
false;
205 std::unique_ptr<QFileSystemWatcher> mWatcher;
207 QString mRootProfilePath;
209 std::unique_ptr<QgsUserProfile> mUserProfile;
211 QString settingsFile()
const;
213 std::unique_ptr< QSettings > mSettings;
218 #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...