Class: PyQgsSettingsEntryEnumFlag

class PyQgsSettingsEntryEnumFlag An enum settings entry. since QGIS 3.20

List of all members, including inherited members

Class Hierarchy

Inheritance diagram of qgis.core.PyQgsSettingsEntryEnumFlag

Base classes

QgsSettingsEntryBase

Represents a settings entry and provides methods for reading and writing settings values.

Methods

defaultValue

Get settings default value.

enum_key_count

Returns the number of values in the associated enum

key_for_index

Returns the enum value at the specified index

setValue

Set settings value.

value

Get settings value.

valueWithDefaultOverride

Get settings value with a default value override.

value_to_key

Returns the enum key name for the specified value

Virtual Methods

In PyQGIS, only methods marked as virtual can be safely overridden in a Python subclass of PyQgsSettingsEntryEnumFlag. See the FAQ for more details.

settingsType

Get the settings entry type.

typeId

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

class qgis.core.PyQgsSettingsEntryEnumFlag(key, pluginName, defaultValue, description='', options=<SettingsOption: 0>)

Bases: QgsSettingsEntryBase

__init__(key, pluginName, defaultValue, description='', options=<SettingsOption: 0>)

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.

enum_key_count() int

Returns the number of values in the associated enum

key_for_index(index: int)

Returns the enum value at the specified index

Raises:

IndexError if value is invalid

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)

virtual settingsType()

Get the settings entry type.

virtual 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.

value_to_key(value: int) str

Returns the enum key name for the specified value

Raises:

IndexError if value is invalid