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

childEvent

configureEditor

Configures the editor according the setting

configureEditorPrivate

Configures an existing editor widget

connectNotify

createEditor

Creates the editor widget for the given setting

createEditorPrivate

Creates the widgets

createWrapper

Creates a new instance of the editor wrapper so it can be configured for a widget and a setting

customEvent

disconnectNotify

fromWidget

Creates a wrapper from the definition stored in a widget created by createEditor()

id

This id of the type of settings it handles

isSignalConnected

receivers

sender

senderSignalIndex

setSettingFromWidget

Sets the setting value from the widget value The wrapper must be configured before calling this medthod

setWidgetFromSetting

Sets the widget value from the setting value The wrapper must be configured before calling this medthod

setWidgetFromVariant

Sets the value of the widget The wrapper must be configured before calling this medthod

timerEvent

variantValueFromWidget

Returns 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:
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:

QgsSettingsEditorWidgetWrapper

customEvent(self, QEvent)
disconnectNotify(self, QMetaMethod)
fromWidget(widget: QWidget) QgsSettingsEditorWidgetWrapper

Creates a wrapper from the definition stored in a widget created by createEditor()

Parameters:

widget (QWidget) –

Return type:

QgsSettingsEditorWidgetWrapper

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