Class: QgsMapLayerConfigWidget¶
A panel widget that can be shown in the map style dock
Class Hierarchy¶
Base classes¶
Base class for any widget that can be shown as a inline panel |
|
Subclasses¶
The |
|
A generic widget for setting the 2D renderer for a point cloud layer. |
|
Histogram widget |
|
Widget to control a layers transparency and related options |
|
A widget to hold the renderer properties for a raster layer. |
|
A generic widget for setting the 2D renderer for a tiled scene layer. |
Methods
Called when changes to the layer need to be made. |
|
Focuses the default widget for the page. |
|
Sets the context under which the widget is being shown. |
|
Whether this config widget changes map layer properties in a way that |
|
Reset to original (vector layer) values |
- class qgis.gui.QgsMapLayerConfigWidget[source]¶
Bases:
QgsPanelWidget
- __init__(layer: QgsMapLayer | None, canvas: QgsMapCanvas | None, parent: QWidget | None = None)
A panel widget that can be shown in the map style dock
- Parameters:
layer (Optional[QgsMapLayer]) – The layer active in the dock.
canvas (Optional[QgsMapCanvas]) – The canvas object.
parent (Optional[QWidget] = None) – 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.
- apply(self)[source]¶
Called when changes to the layer need to be made. Will be called when live update is enabled.
- setMapLayerConfigWidgetContext(self, context: QgsMapLayerConfigWidgetContext)[source]¶
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)
- shouldTriggerLayerRepaint(self) bool [source]¶
Whether this config widget changes map layer properties in a way that
triggerRepaint()
should be called for the layer after applying changes. This isTrue
by default, but some config widgets (for example 3D rendering config) do not need layer repaint as they do not modify 2D map rendering.Added in version 3.8.
- Return type:
bool
- syncToLayer(self, layer: QgsMapLayer | None)[source]¶
Reset to original (vector layer) values
Added in version 3.14.
- Parameters:
layer (Optional[QgsMapLayer])