QGIS API Documentation 3.99.0-Master (a8882ad4560)
Loading...
Searching...
No Matches
QgsApplicationThemeRegistry Class Reference

Registry of user interface themes. More...

#include <qgsapplicationthemeregistry.h>

Public Member Functions

 QgsApplicationThemeRegistry ()
 Constructor for an empty user interface theme registry.
 ~QgsApplicationThemeRegistry ()=default
bool addTheme (const QString &name, const QString &folder)
 Adds a user interface theme into the registry.
bool removeTheme (const QString &name)
 Removes a user interface theme with a matching name from the registry.
QString themeFolder (const QString &name) const
 Returns the user interface theme folder for a matching name.
QHash< QString, QString > themeFolders () const
 Returns a map of user interface theme names and folders.
QStringList themes () const
 Returns the list of available user interface themes.

Detailed Description

Registry of user interface themes.

A registry of user interface themes. This class should be accessed via QgsApplication::userInterfaceThemeRegistry().

Since
QGIS 4.0

Definition at line 35 of file qgsapplicationthemeregistry.h.

Constructor & Destructor Documentation

◆ QgsApplicationThemeRegistry()

QgsApplicationThemeRegistry::QgsApplicationThemeRegistry ( )

Constructor for an empty user interface theme registry.

Definition at line 24 of file qgsapplicationthemeregistry.cpp.

◆ ~QgsApplicationThemeRegistry()

QgsApplicationThemeRegistry::~QgsApplicationThemeRegistry ( )
default

Member Function Documentation

◆ addTheme()

bool QgsApplicationThemeRegistry::addTheme ( const QString & name,
const QString & folder )

Adds a user interface theme into the registry.

If the provided theme name is already in the registry, the theme will not be added.

Parameters
nameThe theme name to be added
folderThe theme folder where theme-related files are located
Returns
true if the theme was added into the registry

Definition at line 47 of file qgsapplicationthemeregistry.cpp.

◆ removeTheme()

bool QgsApplicationThemeRegistry::removeTheme ( const QString & name)

Removes a user interface theme with a matching name from the registry.

Parameters
nameThe theme name to be removed
Returns
true if the theme was removed from the registry

Definition at line 70 of file qgsapplicationthemeregistry.cpp.

◆ themeFolder()

QString QgsApplicationThemeRegistry::themeFolder ( const QString & name) const

Returns the user interface theme folder for a matching name.

Definition at line 86 of file qgsapplicationthemeregistry.cpp.

◆ themeFolders()

QHash< QString, QString > QgsApplicationThemeRegistry::themeFolders ( ) const

Returns a map of user interface theme names and folders.

Definition at line 91 of file qgsapplicationthemeregistry.cpp.

◆ themes()

QStringList QgsApplicationThemeRegistry::themes ( ) const

Returns the list of available user interface themes.

Definition at line 81 of file qgsapplicationthemeregistry.cpp.


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