QGIS API Documentation 3.41.0-Master (45a0abf3bec)
|
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. | |
const QString | alias () const |
Returns the alias for the user profile. | |
const QString | folder () const |
The base folder for the user profile. | |
const QIcon | icon () const |
The icon for the user profile. | |
void | initSettings () const |
Init the settings from the user folder. | |
const QString | name () const |
The name for the user profile. | |
QgsError | setAlias (const QString &alias) const |
Set the alias of the profile. | |
QgsError | validate () const |
Check of the profile is in a valid state. | |
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 26 of file qgsuserprofile.cpp.
const QString QgsUserProfile::alias | ( | ) | const |
Returns the alias for the user profile.
Definition at line 59 of file qgsuserprofile.cpp.
const QString QgsUserProfile::folder | ( | ) | const |
The base folder for the user profile.
Definition at line 31 of file qgsuserprofile.cpp.
const QIcon QgsUserProfile::icon | ( | ) | const |
The icon for the user profile.
Definition at line 128 of file qgsuserprofile.cpp.
void QgsUserProfile::initSettings | ( | ) | const |
Init the settings from the user folder.
Definition at line 52 of file qgsuserprofile.cpp.
const QString QgsUserProfile::name | ( | ) | const |
The name for the user profile.
Definition at line 46 of file qgsuserprofile.cpp.
QgsError QgsUserProfile::setAlias | ( | const QString & | alias | ) | const |
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 93 of file qgsuserprofile.cpp.
QgsError QgsUserProfile::validate | ( | ) | const |
Check of the profile is in a valid state.
Definition at line 36 of file qgsuserprofile.cpp.