QGIS API Documentation 3.41.0-Master (af5edcb665c)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsUserProfile Class Reference

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ QgsUserProfile()

QgsUserProfile::QgsUserProfile ( const QString &  folder)

Reference to a existing user profile folder.

Profile folder should be created using QgsProfileManager.

Parameters
folderAn existing profile folder as the base of the user profile.

Definition at line 26 of file qgsuserprofile.cpp.

Member Function Documentation

◆ alias()

const QString QgsUserProfile::alias ( ) const

Returns the alias for the user profile.

Returns
If no alias is set name() is returned.

Definition at line 59 of file qgsuserprofile.cpp.

◆ folder()

const QString QgsUserProfile::folder ( ) const

The base folder for the user profile.

Definition at line 31 of file qgsuserprofile.cpp.

◆ icon()

const QIcon QgsUserProfile::icon ( ) const

The icon for the user profile.

Returns
A QIcon for the users

Definition at line 128 of file qgsuserprofile.cpp.

◆ initSettings()

void QgsUserProfile::initSettings ( ) const

Init the settings from the user folder.

Definition at line 52 of file qgsuserprofile.cpp.

◆ name()

const QString QgsUserProfile::name ( ) const

The name for the user profile.

Definition at line 46 of file qgsuserprofile.cpp.

◆ setAlias()

QgsError QgsUserProfile::setAlias ( const QString &  alias) const

Set the alias of the profile.

The alias is a user friendly name.

Parameters
aliasA user friendly name for the profile.
Returns
true of setting the alias was successful.

Definition at line 93 of file qgsuserprofile.cpp.

◆ validate()

QgsError QgsUserProfile::validate ( ) const

Check of the profile is in a valid state.

Definition at line 36 of file qgsuserprofile.cpp.


The documentation for this class was generated from the following files: