Class: QgsMapLayerConfigWidget

class qgis.gui.QgsMapLayerConfigWidget

Bases: QgsPanelWidget

A panel widget that can be shown in the map style dock

New in version 2.16.

QgsMapLayerConfigWidget(layer: QgsMapLayer, canvas: QgsMapCanvas, parent: QWidget = None) A panel widget that can be shown in the map style dock

Parameters:
  • layer – The layer active in the dock.

  • canvas – The canvas object.

  • parent – The parent of the widget.

Note

The widget is created each time the panel is selected in the dock. Keep the loading light as possible for speed in the UI.

Methods

actionEvent

apply

Called when changes to the layer need to be made.

changeEvent

childEvent

closeEvent

connectNotify

contextMenuEvent

create

customEvent

destroy

disconnectNotify

dragEnterEvent

dragLeaveEvent

dragMoveEvent

dropEvent

enterEvent

event

focusDefaultWidget

Focuses the default widget for the page.

focusInEvent

focusNextChild

focusNextPrevChild

focusOutEvent

focusPreviousChild

hideEvent

initPainter

inputMethodEvent

isSignalConnected

keyPressEvent

Overridden key press event to handle the esc event on the widget.

keyReleaseEvent

leaveEvent

metric

mouseDoubleClickEvent

mouseMoveEvent

mousePressEvent

mouseReleaseEvent

moveEvent

nativeEvent

paintEvent

receivers

resizeEvent

sender

senderSignalIndex

setMapLayerConfigWidgetContext

Sets the context under which the widget is being shown.

sharedPainter

shouldTriggerLayerRepaint

Whether this config widget changes map layer properties in a way that triggerRepaint() should be called for the layer after applying changes.

showEvent

syncToLayer

Reset to original (vector layer) values

tabletEvent

timerEvent

updateMicroFocus

wheelEvent

actionEvent(self, QActionEvent)
apply(self)

Called when changes to the layer need to be made. Will be called when live update is enabled.

changeEvent(self, QEvent)
childEvent(self, QChildEvent)
closeEvent(self, QCloseEvent)
connectNotify(self, QMetaMethod)
contextMenuEvent(self, QContextMenuEvent)
create(self, window: PyQt5.sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)
customEvent(self, QEvent)
destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True)
disconnectNotify(self, QMetaMethod)
dragEnterEvent(self, QDragEnterEvent)
dragLeaveEvent(self, QDragLeaveEvent)
dragMoveEvent(self, QDragMoveEvent)
dropEvent(self, QDropEvent)
enterEvent(self, QEvent)
event(self, QEvent) bool
focusDefaultWidget(self)

Focuses the default widget for the page.

New in version 3.22.

focusInEvent(self, QFocusEvent)
focusNextChild(self) bool
focusNextPrevChild(self, bool) bool
focusOutEvent(self, QFocusEvent)
focusPreviousChild(self) bool
hideEvent(self, QHideEvent)
initPainter(self, QPainter)
inputMethodEvent(self, QInputMethodEvent)
isSignalConnected(self, QMetaMethod) bool
keyPressEvent(self, event: QKeyEvent)

Overridden key press event to handle the esc event on the widget.

Parameters:

event – The key event

keyReleaseEvent(self, QKeyEvent)
leaveEvent(self, QEvent)
metric(self, QPaintDevice.PaintDeviceMetric) int
mouseDoubleClickEvent(self, QMouseEvent)
mouseMoveEvent(self, QMouseEvent)
mousePressEvent(self, QMouseEvent)
mouseReleaseEvent(self, QMouseEvent)
moveEvent(self, QMoveEvent)
nativeEvent(self, Union[QByteArray, bytes, bytearray], PyQt5.sip.voidptr) Tuple[bool, int]
paintEvent(self, QPaintEvent)
receivers(self, PYQT_SIGNAL) int
resizeEvent(self, QResizeEvent)
sender(self) QObject
senderSignalIndex(self) int
setMapLayerConfigWidgetContext(self, context: QgsMapLayerConfigWidgetContext)

Sets the context under which the widget is being shown.

Subclasses should take care to call the base class implementation when overriding this method.

Parameters:

context (QgsMapLayerConfigWidgetContext) –

sharedPainter(self) QPainter
shouldTriggerLayerRepaint(self) bool

Whether this config widget changes map layer properties in a way that triggerRepaint() should be called for the layer after applying changes. This is True by default, but some config widgets (for example 3D rendering config) do not need layer repaint as they do not modify 2D map rendering.

New in version 3.8.

Return type:

bool

showEvent(self, QShowEvent)
syncToLayer(self, layer: QgsMapLayer)

Reset to original (vector layer) values

New in version 3.14.

Parameters:

layer (QgsMapLayer) –

tabletEvent(self, QTabletEvent)
timerEvent(self, QTimerEvent)
updateMicroFocus(self)
wheelEvent(self, QWheelEvent)