Class: QgsSettingsEntryByValueqlonglongBase

class qgis.core.QgsSettingsEntryByValueqlonglongBase

Bases: QgsSettingsEntryBase

Base abstract class for settings entry which are passed by value

See also

QgsSettingsEntryByReference

New in version 3.26.

QgsSettingsEntryByValueqlonglongBase(key: str, section: str, defaultValue: Any, description: str = ‘’, options: Union[Qgis.SettingsOptions, Qgis.SettingsOption] = Qgis.SettingsOptions()) Constructor for QgsSettingsEntryByValue.

The key argument specifies the key of the settings. The section argument specifies the section. The defaultValue argument specifies the default value for the settings entry. The description argument specifies a description for the settings entry. The options arguments specifies the options for the settings entry.

QgsSettingsEntryByValueqlonglongBase(QgsSettingsEntryByValueqlonglongBase)

Methods

checkValue

Check if the value is valid

convertFromVariant

Converts the variant value to the value type of the setting

convertToVariant

Converts the value to a variant

defaultValue

Returns settings default value.

formerValue

Returns the former value Returns the current value (or default) if there is no former value.

setValue

Set settings value.

setValuePrivate

Sets the settings value with an optional list of dynamic parts

setVariantValuePrivate

Sets the settings value with a variant value.

settingsType

rtype

Qgis.SettingsType

value

Returns settings value.

valueWithDefaultOverride

Returns the settings value with a defaultValueOverride and with an optional dynamicKeyPart

checkValue(self, value: int) bool

Check if the value is valid

Parameters

value (int) –

Return type

bool

convertFromVariant(self, value: Any) int

Converts the variant value to the value type of the setting

Parameters

value (Any) –

Return type

int

convertToVariant(self, value: int) Any

Converts the value to a variant

Parameters

value (int) –

Return type

Any

defaultValue(self) int

Returns settings default value.

Return type

int

formerValue(self, dynamicKeyPart: str = '') int

Returns the former value Returns the current value (or default) if there is no former value.

formerValue(self, dynamicKeyPartList: Iterable[str]) -> int Returns the former value Returns the current value (or default) if there is no former value.

Parameters

dynamicKeyPart (str = '') –

Return type

int

setValue(self, value: int, dynamicKeyPart: str = '') bool

Set settings value.

The value to set. The dynamicKeyPart argument specifies the dynamic part of the settings key.

setValue(self, value: int, dynamicKeyPartList: Iterable[str]) -> bool Set settings value.

The value to set. The dynamicKeyParts argument specifies the list of dynamic parts of the settings key.

Parameters
  • value (int) –

  • dynamicKeyPart (str = '') –

Return type

bool

setValuePrivate(self, value: int, dynamicKeyPartList: Iterable[str]) bool

Sets the settings value with an optional list of dynamic parts

Parameters
  • value (int) –

  • dynamicKeyPartList (Iterable[str]) –

Return type

bool

setVariantValuePrivate(self, value: Any, dynamicKeyPartList: Iterable[str] = []) bool

Sets the settings value with a variant value. This should be called from any implementation as it takes care of actually calling QSettings

New in version 3.26.

settingsType(self) Qgis.SettingsType
Return type

Qgis.SettingsType

value(self, dynamicKeyPart: str = '') int

Returns settings value.

The dynamicKeyPart argument specifies the dynamic part of the settings key. The defaultValueOverride argument if valid is used instead of the normal default value.

value(self, dynamicKeyPartList: Iterable[str]) -> int Returns settings value.

The dynamicKeyPartList argument specifies the list of dynamic parts of the settings key. The defaultValueOverride argument if valid is used instead of the normal default value.

value(self, dynamicKeyPart: str, useDefaultValueOverride: bool, defaultValueOverride: int) -> int Returns the settings value for the dynamicKeyPart and with a defaultValueOverride

Deprecated since version QGIS: 3.26 use valueWithDefaultOverride instead

value(self, dynamicKeyPartList: Iterable[str], useDefaultValueOverride: bool, defaultValueOverride: int) -> int Returns the settings value for the dynamicKeyPartList and with a defaultValueOverride

Deprecated since version QGIS: 3.26 use valueWithDefaultOverride instead

Parameters

dynamicKeyPart (str = '') –

Return type

int

valueWithDefaultOverride(self, defaultValueOverride: int, dynamicKeyPart: str = '') int

Returns the settings value with a defaultValueOverride and with an optional dynamicKeyPart

valueWithDefaultOverride(self, defaultValueOverride: int, dynamicKeyPartList: Iterable[str]) -> int Returns the settings value with a defaultValueOverride for the dynamicKeyPartList

Parameters
  • defaultValueOverride (int) –

  • dynamicKeyPart (str = '') –

Return type

int