Class: QgsSettingsEditorWidgetWrapper¶
- class qgis.gui.QgsSettingsEditorWidgetWrapper¶
Bases:
PyQt5.QtCore.QObject
Base class for settings editor wrappers
New in version 3.32.
QgsSettingsEditorWidgetWrapper(parent: QObject = None) Constructor
Methods
Configures the
editor
according the settingConfigures an existing
editor
widgetCreates 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
Creates a wrapper from the definition stored in a
widget
created bycreateEditor()
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 medthodReturns the value from the widget as a variant The wrapper must be configured before calling this medthod
- childEvent(self, QChildEvent)¶
- configureEditor(self, editor: QWidget, setting: QgsSettingsEntryBase, dynamicKeyPartList: Iterable[str] = []) bool ¶
Configures the
editor
according the setting- Parameters:
editor (QWidget) –
setting (QgsSettingsEntryBase) –
dynamicKeyPartList (Iterable[str] = []) –
- Return type:
bool
- configureEditorPrivate(self, editor: QWidget, setting: QgsSettingsEntryBase) bool ¶
Configures an existing
editor
widget- Parameters:
editor (QWidget) –
setting (QgsSettingsEntryBase) –
- Return type:
bool
- connectNotify(self, QMetaMethod)¶
- createEditor(self, setting: QgsSettingsEntryBase, dynamicKeyPartList: Iterable[str] = [], parent: QWidget = None) QWidget ¶
Creates the editor widget for the given
setting
- Parameters:
setting (QgsSettingsEntryBase) –
dynamicKeyPartList (Iterable[str] = []) –
parent (QWidget = None) –
- Return type:
QWidget
- createEditorPrivate(self, parent: QWidget = None) QWidget ¶
Creates the widgets
- Parameters:
parent (QWidget = None) –
- Return type:
QWidget
- createWrapper(self, parent: QObject = None) QgsSettingsEditorWidgetWrapper ¶
Creates a new instance of the editor wrapper so it can be configured for a widget and a setting
- Parameters:
parent (QObject = None) –
- Return type:
- customEvent(self, QEvent)¶
- disconnectNotify(self, QMetaMethod)¶
- fromWidget(widget: QWidget) QgsSettingsEditorWidgetWrapper ¶
Creates a wrapper from the definition stored in a
widget
created bycreateEditor()
- Parameters:
widget (QWidget) –
- Return type:
- id(self) str ¶
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
- isSignalConnected(self, QMetaMethod) bool ¶
- receivers(self, PYQT_SIGNAL) int ¶
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- setSettingFromWidget(self) bool ¶
Sets the setting value from the widget value The wrapper must be configured before calling this medthod
- Return type:
bool
- setWidgetFromSetting(self) bool ¶
Sets the widget value from the setting value The wrapper must be configured before calling this medthod
- Return type:
bool
- setWidgetFromVariant(self, value: Any)¶
Sets the
value
of the widget The wrapper must be configured before calling this medthod- Parameters:
value (Any) –
- timerEvent(self, QTimerEvent)¶
- variantValueFromWidget(self) Any ¶
Returns the value from the widget as a variant The wrapper must be configured before calling this medthod
- Return type:
Any