Class: QgsSettingsEntryBaseTemplateboolBase¶
Base abstract class for settings entries with typed get and set methods.
See also
Added in version 3.32.
Class Hierarchy¶
Base classes¶
Represents a settings entry and provides methods for reading and writing settings values. |
Subclasses¶
A boolean settings entry. |
Methods
Check if the value is valid |
|
Converts the variant value to the value type of the setting |
|
Converts the value to a variant |
|
Returns settings default value. |
|
Returns the former value. |
|
Set settings value. |
|
Sets the settings value with an optional list of dynamic parts |
|
Returns settings value. |
|
Returns the settings value with a defaultValueOverride and with an optional dynamicKeyPart |
- class qgis.core.QgsSettingsEntryBaseTemplateboolBase¶
Bases:
QgsSettingsEntryBase
- __init__(name: str | None, parent: QgsSettingsTreeNode | None, defaultValue: Any, description: str | None = '', options: Qgis.SettingsOptions | Qgis.SettingsOption = Qgis.SettingsOptions())
Constructor for
QgsSettingsEntryByReference
.- Parameters:
name (Optional[str]) – specifies the key of the settings.
parent (Optional[QgsSettingsTreeNode]) – specifies the parent in the tree of settings.
defaultValue (Any) – specifies the default value for the settings entry.
description (Optional[str] = '') – specifies a description for the settings entry.
options (Union[Qgis.SettingsOptions, Qgis.SettingsOption] = Qgis.SettingsOptions()) – specifies the options for the settings entry.
- Raises:
QgsSettingsException – if the number of given parent named items doesn’t match the complete key definition
Added in version 3.30.
- __init__(key: str | None, section: str | None, defaultValue: Any, description: str | None = '', options: Qgis.SettingsOptions | Qgis.SettingsOption = Qgis.SettingsOptions())
Constructor for
QgsSettingsEntryByReference
.- Parameters:
key (Optional[str]) – specifies the key of the settings.
section (Optional[str]) – specifies the section.
defaultValue (Any) – specifies the default value for the settings entry.
description (Optional[str] = '') – specifies a description for the settings entry.
options (Union[Qgis.SettingsOptions, Qgis.SettingsOption] = Qgis.SettingsOptions()) – specifies the options for the settings entry.
- __init__(a0: QgsSettingsEntryBaseTemplateboolBase)
- Parameters:
- checkValuePrivate(self, value: bool) bool ¶
Check if the value is valid
- Parameters:
value (bool)
- Return type:
bool
- convertFromVariant(self, value: Any) bool ¶
Converts the variant value to the value type of the setting
- Parameters:
value (Any)
- Return type:
bool
- convertToVariant(self, value: bool) Any ¶
Converts the value to a variant
- Parameters:
value (bool)
- Return type:
Any
- defaultValue(self) bool ¶
Returns settings default value.
- Return type:
bool
- formerValue(self, dynamicKeyPart: str | None = '') bool ¶
Returns the former value. Returns the current value (or default) if there is no former value.
- Parameters:
dynamicKeyPart (Optional[str] = '')
- Return type:
bool
- formerValue(self, dynamicKeyPartList: Iterable[str | None]) bool
Returns the former value Returns the current value (or default) if there is no former value.
- Parameters:
dynamicKeyPartList (Iterable[Optional[str]])
- Return type:
bool
- setValue(self, value: bool, dynamicKeyPart: str | None = '') bool ¶
Set settings value.
- Parameters:
value (bool) – specifies the value to set.
dynamicKeyPart (Optional[str] = '') – specifies the dynamic part of the settings key.
- Return type:
bool
- setValue(self, value: bool, dynamicKeyPartList: Iterable[str | None]) bool
Set settings value.
- Parameters:
value (bool) – specifies the value to set.
dynamicKeyPartList (Iterable[Optional[str]]) – specifies the list of dynamic parts of the settings key.
- Return type:
bool
- setValuePrivate(self, value: bool, dynamicKeyPartList: Iterable[str | None]) bool ¶
Sets the settings value with an optional list of dynamic parts
- Parameters:
value (bool)
dynamicKeyPartList (Iterable[Optional[str]])
- Return type:
bool
- value(self, dynamicKeyPart: str | None = '') bool ¶
Returns settings value.
- Parameters:
dynamicKeyPart (Optional[str] = '') – specifies the dynamic part of the settings key.
- Return type:
bool
- value(self, dynamicKeyPartList: Iterable[str | None]) bool
Returns settings value.
- Parameters:
dynamicKeyPartList (Iterable[Optional[str]]) – specifies the list of dynamic parts of the settings key.
- Return type:
bool
- valueWithDefaultOverride(self, defaultValueOverride: bool, dynamicKeyPart: str | None = '') bool ¶
Returns the settings value with a
defaultValueOverride
and with an optionaldynamicKeyPart
- Parameters:
defaultValueOverride (bool)
dynamicKeyPart (Optional[str] = '')
- Return type:
bool
- valueWithDefaultOverride(self, defaultValueOverride: bool, dynamicKeyPartList: Iterable[str | None]) bool
Returns the settings value with a
defaultValueOverride
for thedynamicKeyPartList
- Parameters:
defaultValueOverride (bool)
dynamicKeyPartList (Iterable[Optional[str]])
- Return type:
bool