Class: QgsSettingsEntryInteger¶
- class qgis.core.QgsSettingsEntryInteger¶
Bases:
QgsSettingsEntryByValueqlonglongBase
An integer settings entry.
New in version 3.20.
QgsSettingsEntryInteger(key: str, pluginName: str, defaultValue: int = 0, description: str = ‘’, options: Union[Qgis.SettingsOptions, Qgis.SettingsOption] = Qgis.SettingsOptions(), minValue: int = LLONG_MIN, maxValue: int = LLONG_MAX) Constructor for QgsSettingsEntryInteger. This constructor is intended to be used from plugins.
The
key
argument specifies the key of the settings. ThepluginName
argument is used to define the key of the setting 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. TheminValue
argument specifies the minimal value. ThemaxValue
argument specifies the maximal value.QgsSettingsEntryInteger(
QgsSettingsEntryInteger
)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 the maximum value.
Returns the minimum value.
Set the maximum value.
Set the minimum value.
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: int) bool ¶
Check if the value is valid
- convertFromVariant(self, value: Any) int ¶
Converts the variant value to the value type of the setting
- convertToVariant(self, value: int) Any ¶
Converts the value to a variant
- maxValue(self) int ¶
Returns the maximum value.
- Return type:
int
- minValue(self) int ¶
Returns the minimum value.
- Return type:
int
- setMaxValue(self, maxValue: int)¶
Set the maximum value.
maxValue The maximum value.
- Parameters:
maxValue (int) –
- setMinValue(self, minValue: int)¶
Set the minimum value.
minValue The minimum value.
- Parameters:
minValue (int) –
- setValuePrivate(self, value: int, 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: