Class: PyQgsSettingsEntryEnumFlag

class PyQgsSettingsEntryEnumFlag An enum settings entry. since QGIS 3.20

Class Hierarchy

Inheritance diagram of qgis.core.PyQgsSettingsEntryEnumFlag

Base classes

QgsSettingsEntryBase

Represent settings entry and provides methods for reading and writing settings values. Different subclasses are provided for different settings types with metainformations to validate set values and provide more accurate settings description for the gui.

Methods

defaultValue

Get settings default value.

metaEnum

setValue

Set settings value.

settingsType

Get the settings entry type.

typeId

Defines a custom id since this class has not the same API as the cpp implementation

value

Get settings value.

valueWithDefaultOverride

Get settings value with a default value override.

class qgis.core.PyQgsSettingsEntryEnumFlag(key, pluginName, defaultValue, description='', options=<qgis._core.Qgis.SettingsOptions object>)

Bases: QgsSettingsEntryBase

__init__(key, pluginName, defaultValue, description='', options=<qgis._core.Qgis.SettingsOptions object>)

Constructor for PyQgsSettingsEntryEnumFlag.

Parameters:
  • key – argument specifies the final part of the settings key.

  • pluginName – argument is either the plugin name or the settings tree parent element

  • defaultValue – argument specifies the default value for the settings entry.

  • description – argument specifies a description for the settings entry.

defaultValue()

Get settings default value.

metaEnum()
setValue(value, dynamicKeyPart: (<class 'list'>, <class 'str'>) = None)

Set settings value.

Parameters:
  • value – the value to set for the setting.

  • dynamicKeyPart – argument specifies the dynamic part of the settings key (a single one a string, or several as a list)

settingsType()

Get the settings entry type.

typeId()

Defines a custom id since this class has not the same API as the cpp implementation

value(dynamicKeyPart=None)

Get settings value.

Parameters:

dynamicKeyPart – argument specifies the dynamic part of the settings key.

valueWithDefaultOverride(defaultValueOverride, dynamicKeyPart=None)

Get settings value with a default value override.

Parameters:
  • defaultValueOverride – argument if valid is used instead of the normal default value.

  • dynamicKeyPart – argument specifies the dynamic part of the settings key.