Class: QgsRendererRasterPropertiesWidget¶
A widget for configuring properties of a raster layer renderer.

QgsRendererRasterPropertiesWidget¶
Class Hierarchy¶
Base classes¶
A panel widget that can be shown in the map style dock. |
|
Base class for any widget that can be shown as an inline panel. |
|
Abstract Methods
Apply the changes from the dialog to the layer. |
Methods
Returns the active render widget. |
|
called when user changes renderer type |
|
Sets the map canvas associated with the dialog. |
Virtual Methods
In PyQGIS, only methods marked as virtual
can be safely overridden in a Python subclass of QgsRendererRasterPropertiesWidget. See the FAQ for more details.
Sync the widget to the given layer. |
- class qgis.gui.QgsRendererRasterPropertiesWidget[source]¶
Bases:
QgsMapLayerConfigWidget
- __init__(layer: QgsMapLayer | None, canvas: QgsMapCanvas | None, parent: QWidget | None = None)
A widget to hold the renderer properties for a raster layer.
- Parameters:
layer (Optional[QgsMapLayer]) – The raster layer to style
canvas (Optional[QgsMapCanvas]) – The canvas object used to calculate the max and min values from the extent.
parent (Optional[QWidget] = None) – Parent object
- currentRenderWidget(self) QgsRasterRendererWidget | None [source]¶
Returns the active render widget. Can be
None
.- Return type:
Optional[QgsRasterRendererWidget]
- setMapCanvas(self, canvas: QgsMapCanvas | None)[source]¶
Sets the map canvas associated with the dialog. This allows the widget to retrieve the current map scale and other properties from the canvas.
- Parameters:
canvas (Optional[QgsMapCanvas]) – map canvas
- virtual syncToLayer(self, layer: QgsRasterLayer | None)[source]¶
Sync the widget to the given layer.
- Parameters:
layer (Optional[QgsRasterLayer]) – The layer to use for the widget