Class: QgsApplicationThemeRegistry

Registry of user interface themes.

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

Added in version 4.0.

List of all members, including inherited members

Methods

addTheme

Adds a user interface theme into the registry.

removeTheme

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

themeFolder

Returns the user interface theme folder for a matching name.

themeFolders

Returns a map of user interface theme names and folders.

themes

Returns the list of available user interface themes.

class qgis.core.QgsApplicationThemeRegistry[source]

Bases: object

__init__()

Constructor for an empty user interface theme registry

__init__(a0: QgsApplicationThemeRegistry)
Parameters:

a0 (QgsApplicationThemeRegistry)

addTheme(self, name: str | None, folder: str | None) bool[source]

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:
  • name (Optional[str]) – The theme name to be added

  • folder (Optional[str]) – The theme folder where theme-related files are located

Return type:

bool

Returns:

True if the theme was added into the registry

removeTheme(self, name: str | None) bool[source]

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

Parameters:

name (Optional[str]) – The theme name to be removed

Return type:

bool

Returns:

True if the theme was removed from the registry

themeFolder(self, name: str | None) str[source]

Returns the user interface theme folder for a matching name.

Parameters:

name (Optional[str])

Return type:

str

themeFolders(self) dict[str, str]

Returns a map of user interface theme names and folders.

Return type:

dict[str, str]

themes(self) list[str][source]

Returns the list of available user interface themes.

Return type:

list[str]