Class: QgsMapLayerConfigWidget¶
A panel widget that can be shown in the map style dock.
Note
This is an abstract class, with methods which must be implemented by a subclass.
The following methods must be implemented: apply()
Class Hierarchy¶
Base classes¶
Base class for any widget that can be shown as an inline panel. |
|
Subclasses¶
A widget which is used to visually manage the layer styles. |
|
A generic widget for setting the 2D renderer for a point cloud layer. |
|
A widget for display and configuring a raster layer histogram. |
|
A widget for controlling a raster layer’s transparency and related options. |
|
A widget for configuring properties of a raster layer renderer. |
|
A generic widget for setting the 2D renderer for a tiled scene layer. |
Abstract Methods
Called when changes to the layer need to be made. |
Virtual Methods
In PyQGIS, only methods marked as virtual
can be safely overridden in a Python subclass of QgsMapLayerConfigWidget. See the FAQ for more details.
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.
- abstract apply(self)[source]¶
Called when changes to the layer need to be made. Will be called when live update is enabled.
- virtual focusDefaultWidget(self)[source]¶
Focuses the default widget for the page.
Added in version 3.22.
- virtual 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)
- virtual 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
- virtual syncToLayer(self, layer: QgsMapLayer | None)[source]¶
Reset to original (vector layer) values
Added in version 3.14.
- Parameters:
layer (Optional[QgsMapLayer])