Class: QgsSettingsEntryBool¶
- class qgis.core.QgsSettingsEntryBool¶
Bases:
QgsSettingsEntryByValueboolBase
A boolean settings entry.
New in version 3.20.
QgsSettingsEntryBool(key: str, pluginName: str, defaultValue: bool = False, description: str = ‘’, options: Union[Qgis.SettingsOptions, Qgis.SettingsOption] = Qgis.SettingsOptions()) Constructor for QgsSettingsEntryBool. This constructor is intended to be used from plugins.
The
key
argument specifies the key of the settings. ThepluginName
argument is inserted in the key after the section. ThedefaultValue
argument specifies the default value for the settings entry. Thedescription
argument specifies a description for the settings entry. Theoptions
arguments specifies the options for the settings entry.QgsSettingsEntryBool(
QgsSettingsEntryBool
)Methods
Check if the value is valid
Converts the variant value to the value type of the setting
Converts the value to a variant
Sets the settings value with an optional list of dynamic parts
Sets the settings value with a variant value.
- rtype:
Qgis.SettingsType
- checkValue(self, value: bool) bool ¶
Check if the value is valid
- convertFromVariant(self, value: Any) bool ¶
Converts the variant value to the value type of the setting
- convertToVariant(self, value: bool) Any ¶
Converts the value to a variant
- setValuePrivate(self, value: bool, dynamicKeyPartList: Iterable[str]) bool ¶
Sets the settings value with an optional list of dynamic parts
- 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: