Class: QgsSettingsRegistry

Used for settings introspection and collects a list of child QgsSettingsRegistry and a list of child QgsSettingsRegistry.

Added in version 3.20.

Deprecated since version 3.30: Use QgsSettings.treeRoot() instead.

Class Hierarchy

Inheritance diagram of qgis.core.QgsSettingsRegistry

Subclasses

QgsSettingsRegistryCore

Used for settings introspection and collects all QgsSettingsEntry instances of core.

QgsSettingsRegistryGui

Used for settings introspection and collects all QgsSettingsEntry instances of GUI.

Methods

addSettingsEntry

Adds settingsEntry to the registry.

addSettingsEntryGroup

Adds a group of setting to the registry

addSubRegistry

Append a child settingsRegistry to the register.

removeSubRegistry

Remove a child settingsRegistry from the register.

settingEntries

Returns the list of registered QgsSettingsEntryBase.

settingsEntry

Returns the QgsSettingsEntry with the given key or None if not found.

subRegistries

Returns the list of registered child QgsSettingsRegistry.

class qgis.core.QgsSettingsRegistry[source]

Bases: object

addSettingsEntry(self, settingsEntry: QgsSettingsEntryBase | None) bool[source]

Adds settingsEntry to the registry.

Parameters:

settingsEntry (Optional[QgsSettingsEntryBase])

Return type:

bool

addSettingsEntryGroup(self, settingsGroup: QgsSettingsEntryGroup | None)[source]

Adds a group of setting to the registry

Added in version 3.26.

Deprecated since version 3.30.

Parameters:

settingsGroup (Optional[QgsSettingsEntryGroup])

addSubRegistry(self, settingsRegistry: QgsSettingsRegistry | None)[source]

Append a child settingsRegistry to the register.

Parameters:

settingsRegistry (Optional[QgsSettingsRegistry])

removeSubRegistry(self, settingsRegistry: QgsSettingsRegistry | None)[source]

Remove a child settingsRegistry from the register.

Parameters:

settingsRegistry (Optional[QgsSettingsRegistry])

settingEntries(self) List[QgsSettingsEntryBase]

Returns the list of registered QgsSettingsEntryBase.

Return type:

List[QgsSettingsEntryBase]

settingsEntry(self, key: str | None, searchChildRegistries: bool = True) QgsSettingsEntryBase | None[source]

Returns the QgsSettingsEntry with the given key or None if not found.

The searchChildRegistries parameter specifies if child registries should be included in the search

Parameters:
  • key (Optional[str])

  • searchChildRegistries (bool = True)

Return type:

Optional[QgsSettingsEntryBase]

subRegistries(self) List[QgsSettingsRegistry]

Returns the list of registered child QgsSettingsRegistry.

Return type:

List[QgsSettingsRegistry]