QGIS API Documentation
3.24.2-Tisler (13c1a02865)
|
User profile contains information about the user profile folders on the machine. More...
#include <qgsuserprofile.h>
Public Member Functions | |
QgsUserProfile (const QString &folder) | |
Reference to a existing user profile folder. More... | |
const QString | alias () const |
Returns the alias for the user profile. More... | |
const QString | folder () const |
The base folder for the user profile. More... | |
const QIcon | icon () const |
The icon for the user profile. More... | |
void | initSettings () const |
Init the settings from the user folder. More... | |
const QString | name () const |
The name for the user profile. More... | |
QgsError | setAlias (const QString &alias) |
Set the alias of the profile. More... | |
QgsError | validate () const |
Check of the profile is in a valid state. More... | |
User profile contains information about the user profile folders on the machine.
In QGIS 3 all settings, plugins, etc were moved into a APPDATA%/profiles folder for each platform. This allows for manage different user profiles per machine vs the single default one that was allowed in the past.
A user profile is all settings and anything that used to be found in .qgis3 in the users home folder.
Definition at line 34 of file qgsuserprofile.h.
QgsUserProfile::QgsUserProfile | ( | const QString & | folder | ) |
Reference to a existing user profile folder.
Profile folder should be created using QgsProfileManager.
folder | An existing profile folder as the base of the user profile. |
Definition at line 25 of file qgsuserprofile.cpp.
const QString QgsUserProfile::alias | ( | ) | const |
Returns the alias for the user profile.
Definition at line 58 of file qgsuserprofile.cpp.
const QString QgsUserProfile::folder | ( | ) | const |
The base folder for the user profile.
Definition at line 30 of file qgsuserprofile.cpp.
const QIcon QgsUserProfile::icon | ( | ) | const |
The icon for the user profile.
Definition at line 127 of file qgsuserprofile.cpp.
void QgsUserProfile::initSettings | ( | ) | const |
Init the settings from the user folder.
Definition at line 51 of file qgsuserprofile.cpp.
const QString QgsUserProfile::name | ( | ) | const |
The name for the user profile.
Definition at line 45 of file qgsuserprofile.cpp.
QgsError QgsUserProfile::setAlias | ( | const QString & | alias | ) |
Set the alias of the profile.
The alias is a user friendly name.
alias | A user friendly name for the profile. |
true
of setting the alias was successful. Definition at line 92 of file qgsuserprofile.cpp.
QgsError QgsUserProfile::validate | ( | ) | const |
Check of the profile is in a valid state.
Definition at line 35 of file qgsuserprofile.cpp.