Class: QgsRendererRasterPropertiesWidget

A widget for configuring properties of a raster layer renderer.

QgsRendererRasterPropertiesWidget

QgsRendererRasterPropertiesWidget

Class Hierarchy

Inheritance diagram of qgis.gui.QgsRendererRasterPropertiesWidget

Base classes

QgsMapLayerConfigWidget

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

QgsPanelWidget

Base class for any widget that can be shown as an inline panel.

QWidget

QObject

QPaintDevice

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

abstract apply(self)[source]

Apply the changes from the dialog to the layer.

currentRenderWidget(self) QgsRasterRendererWidget | None[source]

Returns the active render widget. Can be None.

Return type:

Optional[QgsRasterRendererWidget]

rendererChanged(self)[source]

called when user changes renderer type

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