Class: QgsRasterTransparencyWidget

A widget for controlling a raster layer’s transparency and related options.

QgsRasterTransparencyWidget

QgsRasterTransparencyWidget

Class Hierarchy

Inheritance diagram of qgis.gui.QgsRasterTransparencyWidget

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

Abstract Methods

apply

Apply any changes on the widget to the set layer.

Methods

pixelSelectorTool

Returns the (possibly None) map pixel selector tool.

setContext

Sets the context in which the dialog is shown, e.g., the associated map canvas and expression contexts.

Virtual Methods

In PyQGIS, only methods marked as virtual can be safely overridden in a Python subclass of QgsRasterTransparencyWidget. See the FAQ for more details.

createExpressionContext

syncToLayer

Sync the widget state to the layer set for the widget.

class qgis.gui.QgsRasterTransparencyWidget[source]

Bases: QgsMapLayerConfigWidget

__init__(layer: QgsRasterLayer | None, canvas: QgsMapCanvas | None, parent: QWidget | None = None)

Widget to control a layers transparency and related options

Parameters:
abstract apply(self)[source]

Apply any changes on the widget to the set layer.

virtual createExpressionContext(self) QgsExpressionContext[source]
Return type:

QgsExpressionContext

pixelSelectorTool(self) QgsMapToolEmitPoint | None[source]

Returns the (possibly None) map pixel selector tool.

Added in version 3.22.

Return type:

Optional[QgsMapToolEmitPoint]

setContext(self, context: QgsSymbolWidgetContext)[source]

Sets the context in which the dialog is shown, e.g., the associated map canvas and expression contexts.

Added in version 3.22.

Parameters:

context (QgsSymbolWidgetContext)

virtual syncToLayer(self)[source]

Sync the widget state to the layer set for the widget.