QGIS API Documentation  3.6.0-Noosa (5873452)
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. 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...
 

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.

Since
QGIS 3.0

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 25 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 58 of file qgsuserprofile.cpp.

◆ folder()

const QString QgsUserProfile::folder ( ) const

The base folder for the user profile.

Definition at line 30 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 127 of file qgsuserprofile.cpp.

◆ initSettings()

void QgsUserProfile::initSettings ( ) const

Init the settings from the user folder.

Definition at line 51 of file qgsuserprofile.cpp.

◆ name()

const QString QgsUserProfile::name ( ) const

The name for the user profile.

Definition at line 45 of file qgsuserprofile.cpp.

◆ setAlias()

QgsError QgsUserProfile::setAlias ( const QString &  alias)

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 92 of file qgsuserprofile.cpp.

◆ validate()

QgsError QgsUserProfile::validate ( ) const

Check of the profile is in a valid state.

Definition at line 35 of file qgsuserprofile.cpp.


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