Class: QgsSettingsEntryString¶
A string settings entry.
Added in version 3.20.
Class Hierarchy¶
Base classes¶
Base abstract class for settings entries with typed get and set methods. |
|
Represents a settings entry and provides methods for reading and writing settings values. |
Methods
Returns the string maximum length. |
|
Returns the string minimum length. |
- class qgis.core.QgsSettingsEntryString[source]¶
Bases:
QgsSettingsEntryBaseTemplateQStringBase
- __init__(name: str | None, parent: QgsSettingsTreeNode | None, defaultValue: str | None = '', description: str | None = '', options: Qgis.SettingsOptions | Qgis.SettingsOption = Qgis.SettingsOptions(), minLength: int = 0, maxLength: int = -1)
Constructor for QgsSettingsEntryString.
- Parameters:
name (Optional[str]) – specifies the name of the setting.
parent (Optional[QgsSettingsTreeNode]) – specifies the parent in the tree of settings.
defaultValue (Optional[str] = '') – 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.
minLength (int = 0) – specifies the minimal length of the string value. 0 means no limit.
maxLength (int = -1) – specifies the maximal length of the string value. -1 means no limit.
- __init__(key: str | None, pluginName: str | None, defaultValue: str | None = '', description: str | None = '', options: Qgis.SettingsOptions | Qgis.SettingsOption = Qgis.SettingsOptions(), minLength: int = 0, maxLength: int = -1)
Constructor for QgsSettingsEntryString. This constructor is intended to be used from plugins.
- Parameters:
key (Optional[str]) – specifies the key of the settings.
pluginName (Optional[str]) – is inserted in the key after the section.
defaultValue (Optional[str] = '') – 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.
minLength (int = 0)
maxLength (int = -1)
- __init__(a0: QgsSettingsEntryString)
- Parameters: