Class: QgsSettingsEntryDouble

class qgis.core.QgsSettingsEntryDouble

Bases: QgsSettingsEntryBase

A double settings entry.

New in version 3.20.

QgsSettingsEntryDouble(key: str, pluginName: str, defaultValue: float, description: str = ‘’) Constructor for QgsSettingsEntryDouble. This constructor is intended to be used from plugins.

The key argument specifies the key of the settings. The pluginName argument is inserted in the key after the section. The default value argument specifies the default value for the settings entry. The description argument specifies a description for the settings entry.

QgsSettingsEntryDouble(QgsSettingsEntryDouble)

Methods

defaultValue

Get settings default value.

displayHintDecimals

Returns how much decimals should be shown in the Gui.

maxValue

Returns the maximum value.

minValue

Returns the minimum value.

setDisplayHintDecimals

Set the display hint decimals.

setMaxValue

Set the maximum value.

setMinValue

Set the minimum value.

setValue

Set settings value.

settingsType

copydoc QgsSettingsEntryBase.settingsType

value

Get settings value.

defaultValue(self)float

Get settings default value.

Return type

float

displayHintDecimals(self)int

Returns how much decimals should be shown in the Gui.

Return type

int

maxValue(self)float

Returns the maximum value.

Return type

float

minValue(self)float

Returns the minimum value.

Return type

float

setDisplayHintDecimals(self, displayHintDecimals: int)

Set the display hint decimals.

displayHintDecimals The number of decimals that should be shown in the Gui.

Parameters

displayHintDecimals (int) –

setMaxValue(self, maxValue: float)

Set the maximum value.

maxValue The maximum value.

Parameters

maxValue (float) –

setMinValue(self, minValue: float)

Set the minimum value.

minValue The minimum value.

Parameters

minValue (float) –

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

Set settings value.

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

setValue(self, value: float, 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 (float) –

  • dynamicKeyPart (str = '') –

Return type

bool

settingsType(self)QgsSettingsEntryBase.SettingsType

copydoc QgsSettingsEntryBase.settingsType

Return type

QgsSettingsEntryBase.SettingsType

value(self, dynamicKeyPart: str = '', useDefaultValueOverride: bool = False, defaultValueOverride: float = 0)float

Get settings value.

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

value(self, dynamicKeyPartList: Iterable[str], useDefaultValueOverride: bool = False, defaultValueOverride: float = 0) -> float Get settings value.

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

Parameters
  • dynamicKeyPart (str = '') –

  • useDefaultValueOverride (bool = False) –

  • defaultValueOverride (float = 0) –

Return type

float