Class: QgsRasterMinMaxWidget¶
A widget for configuring how the minimum and maximum value of a raster layer is determined.
QgsRasterMinMaxWidget¶
Class Hierarchy¶
Base classes¶
- class qgis.gui.QgsRasterMinMaxWidget[source]¶
Bases:
QWidget- __init__(layer: QgsRasterLayer | None, parent: QWidget | None = None)
Constructor for QgsRasterMinMaxWidget
- Parameters:
layer (Optional[QgsRasterLayer])
parent (Optional[QWidget] = None)
- extent(self) QgsRectangle[source]¶
Returns the extent selected by the user. Either an empty extent for ‘full’ or the current visible extent.
- Return type:
- 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
- Return type:
Optional[QgsMapCanvas]
- minMaxOrigin(self) QgsRasterMinMaxOrigin[source]¶
Returns a
QgsRasterMinMaxOriginobject with the widget values.- Return type:
- 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:
- 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
- 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.