Class: QgsEditorConfigWidget¶
-
class
qgis.gui.
QgsEditorConfigWidget
(vl: QgsVectorLayer, fieldIdx: int, parent: QWidget)¶ Bases:
PyQt5.QtWidgets.QWidget
,QgsExpressionContextGenerator
Create a new configuration widget
- Parameters
vl (QgsVectorLayer) – The layer for which the configuration dialog will be created
fieldIdx (int) – The index of the field on the layer for which this dialog will be created
parent (QWidget) – A parent widget
This class should be subclassed for every configurable editor widget type.
It implements the GUI configuration widget and transforms this to/from a configuration.
It will only be instantiated by {
QgsEditorWidgetFactory
}Methods
Create a configuration from the current GUI state
- rtype
QgsExpressionContext
Returns the field for which this configuration widget applies
Registers a property override button, setting up its initial value, connections and description.
Returns the layer for which this configuration widget applies
Update the configuration widget to represent the given configuration.
Updates a specific property override
button
to reflect the widgets’s current properties.Updates all property override buttons to reflect the widgets’s current properties.
Signals
Emitted when the configuration of the widget is changed.
-
actionEvent
()¶
-
changeEvent
()¶
-
changed
¶ Emitted when the configuration of the widget is changed.
New in version 3.0: [signal]
-
childEvent
()¶
-
closeEvent
()¶
-
config
(self) → Dict[str, Any]¶ Create a configuration from the current GUI state
- Return type
Dict[str, Any]
- Returns
A widget configuration
-
connectNotify
()¶
-
contextMenuEvent
()¶
-
create
()¶
-
createExpressionContext
(self) → QgsExpressionContext¶ - Return type
-
customEvent
()¶
-
destroy
()¶
-
disconnectNotify
()¶
-
dragEnterEvent
()¶
-
dragLeaveEvent
()¶
-
dragMoveEvent
()¶
-
dropEvent
()¶
-
enterEvent
()¶
-
event
()¶
-
field
(self) → int¶ Returns the field for which this configuration widget applies
- Return type
int
- Returns
The field index
-
focusInEvent
()¶
-
focusNextChild
()¶
-
focusNextPrevChild
()¶
-
focusOutEvent
()¶
-
focusPreviousChild
()¶
-
hideEvent
()¶
-
initPainter
()¶
-
initializeDataDefinedButton
(self, button: QgsPropertyOverrideButton, key: QgsWidgetWrapper.Property)¶ Registers a property override button, setting up its initial value, connections and description.
- Parameters
button (QgsPropertyOverrideButton) – button to register
key (QgsWidgetWrapper.Property) – corresponding data defined property key
-
inputMethodEvent
()¶
-
isSignalConnected
()¶
-
keyPressEvent
()¶
-
keyReleaseEvent
()¶
-
layer
(self) → QgsVectorLayer¶ Returns the layer for which this configuration widget applies
- Return type
- Returns
The layer
-
leaveEvent
()¶
-
metric
()¶
-
mouseDoubleClickEvent
()¶
-
mouseMoveEvent
()¶
-
mousePressEvent
()¶
-
mouseReleaseEvent
()¶
-
moveEvent
()¶
-
nativeEvent
()¶
-
paintEvent
()¶
-
receivers
()¶
-
resizeEvent
()¶
-
sender
()¶
-
senderSignalIndex
()¶
-
setConfig
(self, config: Dict[str, Any])¶ Update the configuration widget to represent the given configuration.
- Parameters
config (Dict[str) – The configuration which should be represented by this widget
-
showEvent
()¶
-
tabletEvent
()¶
-
timerEvent
()¶
-
updateDataDefinedButton
(self, button: QgsPropertyOverrideButton)¶ Updates a specific property override
button
to reflect the widgets’s current properties.- Parameters
button (QgsPropertyOverrideButton) –
-
updateDataDefinedButtons
(self)¶ Updates all property override buttons to reflect the widgets’s current properties.
-
updateMicroFocus
()¶
-
wheelEvent
()¶