Class: QgsSettingsEditorWidgetWrapper¶
Base class for settings editor wrappers
Added in version 3.32.
Class Hierarchy¶
Base classes¶
Subclasses¶
|
This class is a base factory of editor for settings |
|
This class is a base factory of editor for settings |
|
This class is a base factory of editor for settings |
|
This class is a base factory of editor for settings |
|
This class is a base factory of editor for settings |
|
This class is a base factory of editor for settings |
A settings editor widget wrapper for enum settings as PyQgsSettingsEntryEnumFlag |
Methods
Configure the settings update behavior when a widget value is changed. |
|
Configures the editor according the setting |
|
Configures an existing editor widget |
|
Creates the editor widget for the given setting |
|
Creates the widgets |
|
Creates a new instance of the editor wrapper so it can be configured for a widget and a setting |
|
Returns the dynamic key parts |
|
Enables automatic update, which causes the setting to be updated immediately when the widget value is changed. |
|
This id of the type of settings it handles |
|
Sets the setting value from the widget value The wrapper must be configured before calling this medthod |
|
Sets the widget value from the setting value The wrapper must be configured before calling this medthod |
|
Sets the value of the widget The wrapper must be configured before calling this medthod |
|
Returns the value from the widget as a variant The wrapper must be configured before calling this medthod |
Static Methods
Creates a wrapper from the definition stored in a widget created by |
- class qgis.gui.QgsSettingsEditorWidgetWrapper[source]¶
Bases:
QObject
- __init__(parent: QObject | None = None)
Constructor
- Parameters:
parent (Optional[QObject] = None)
- configureAutomaticUpdate(self, dialog: QDialog | None = None)[source]¶
Configure the settings update behavior when a widget value is changed.
If a
dialog
is provided, the setting will be updated when the dialog is accepted. If not, the setting will be updated directly at each widget value change.Note
This must called after
createEditor()
orconfigureEditor()
.Added in version 3.40.
- Parameters:
dialog (Optional[QDialog] = None)
- configureEditor(self, editor: QWidget | None, setting: QgsSettingsEntryBase | None, dynamicKeyPartList: Iterable[str | None] = []) bool [source]¶
Configures the
editor
according the setting- Parameters:
editor (Optional[QWidget])
setting (Optional[QgsSettingsEntryBase])
dynamicKeyPartList (Iterable[Optional[str]] = [])
- Return type:
bool
- configureEditorPrivate(self, editor: QWidget | None, setting: QgsSettingsEntryBase | None) bool [source]¶
Configures an existing
editor
widget- Parameters:
editor (Optional[QWidget])
setting (Optional[QgsSettingsEntryBase])
- Return type:
bool
- createEditor(self, setting: QgsSettingsEntryBase | None, dynamicKeyPartList: Iterable[str | None] = [], parent: QWidget | None = None) QWidget | None [source]¶
Creates the editor widget for the given
setting
- Parameters:
setting (Optional[QgsSettingsEntryBase])
dynamicKeyPartList (Iterable[Optional[str]] = [])
parent (Optional[QWidget] = None)
- Return type:
Optional[QWidget]
- createEditorPrivate(self, parent: QWidget | None = None) QWidget | None [source]¶
Creates the widgets
- Parameters:
parent (Optional[QWidget] = None)
- Return type:
Optional[QWidget]
- createWrapper(self, parent: QObject | None = None) QgsSettingsEditorWidgetWrapper | None [source]¶
Creates a new instance of the editor wrapper so it can be configured for a widget and a setting
- Parameters:
parent (Optional[QObject] = None)
- Return type:
Optional[QgsSettingsEditorWidgetWrapper]
- dynamicKeyPartList(self) List[str] [source]¶
Returns the dynamic key parts
Added in version 3.40.
- Return type:
List[str]
- enableAutomaticUpdatePrivate(self)[source]¶
Enables automatic update, which causes the setting to be updated immediately when the widget value is changed.
Added in version 3.40.
- static fromWidget(widget: QWidget | None) QgsSettingsEditorWidgetWrapper | None [source]¶
Creates a wrapper from the definition stored in a
widget
created bycreateEditor()
- Parameters:
widget (Optional[QWidget])
- Return type:
Optional[QgsSettingsEditorWidgetWrapper]
- id(self) str [source]¶
This id of the type of settings it handles
Note
This mostly correspond to the content of
Qgis
.SettingsType but it’s a string since custom Python implementation are possible.- Return type:
str
- setSettingFromWidget(self) bool [source]¶
Sets the setting value from the widget value The wrapper must be configured before calling this medthod
- Return type:
bool
- setWidgetFromSetting(self) bool [source]¶
Sets the widget value from the setting value The wrapper must be configured before calling this medthod
- Return type:
bool