Class: QgsRasterMinMaxWidget

A widget for configuring how the minimum and maximum value of a raster layer is determined.

QgsRasterMinMaxWidget

QgsRasterMinMaxWidget

Class Hierarchy

Inheritance diagram of qgis.gui.QgsRasterMinMaxWidget

Base classes

QWidget

QObject

QPaintDevice

class qgis.gui.QgsRasterMinMaxWidget[source]

Bases: QWidget

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

Constructor for QgsRasterMinMaxWidget

Parameters:
doComputations(self)[source]

Load programmatically with current values

extent(self) QgsRectangle[source]

Returns the extent selected by the user. Either an empty extent for ‘full’ or the current visible extent.

Return type:

QgsRectangle

hideUpdatedExtent(self)[source]

Hide updated extent choice

isCollapsed(self) bool[source]

Returns if the widget is collaped.

Return type:

bool

signal load[source]

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

mapCanvas(self) QgsMapCanvas | None[source]

Returns the map canvas associated with the widget.

See also

setMapCanvas()

Return type:

Optional[QgsMapCanvas]

minMaxOrigin(self) QgsRasterMinMaxOrigin[source]

Returns a QgsRasterMinMaxOrigin object with the widget values.

Return type:

QgsRasterMinMaxOrigin

sampleSize(self) int[source]

Returns the selected sample size.

Return type:

int

setBands(self, bands: Iterable[int])[source]
Parameters:

bands (Iterable[int])

setCollapsed(self, b: bool)[source]

Sets collapsed state of widget

Parameters:

b (bool)

setExtent(self, extent: QgsRectangle)[source]

Sets the extent to use for minimum and maximum value calculation.

Parameters:

extent (QgsRectangle) – extent in raster layer’s CRS

Note

if a map canvas is set using setMapCanvas(), its extent will take precedence over any extent set using this method.

setFromMinMaxOrigin(self, a0: QgsRasterMinMaxOrigin)[source]

Sets the “source” of min/max values.

Parameters:

a0 (QgsRasterMinMaxOrigin)

setMapCanvas(self, canvas: QgsMapCanvas | None)[source]

Sets the map canvas associated with the widget. This allows the widget to retrieve the current map extent from the canvas. If a canvas is set it will take precedence over any extent set from calling setExtent().

Parameters:

canvas (Optional[QgsMapCanvas]) – map canvas

See also

mapCanvas()

userHasSetManualMinMaxValues(self)[source]

Uncheck cumulative cut, min/max, std-dev radio buttons

signal widgetChanged[source]

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.