Class: QgsRasterHistogramWidget¶
A widget for display and configuring a raster layer histogram.

QgsRasterHistogramWidget¶
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. |
|
Methods
Compute the histogram on demand. |
|
Apply a |
|
Save the histogram as an image to disk |
|
slot executed when user wishes to refresh raster histogramwidget |
|
Activate the histogram widget |
|
Sets the renderer widget (or just its name if there is no widget) |
|
Apply a |
- class qgis.gui.QgsRasterHistogramWidget[source]¶
Bases:
QgsMapLayerConfigWidget
- __init__(layer: QgsRasterLayer | None, parent: QWidget | None = None)
Constructor for QgsRasterHistogramWidget, for the specified raster
layer
.- Parameters:
layer (Optional[QgsRasterLayer])
parent (Optional[QWidget] = None)
- computeHistogram(self, forceComputeFlag: bool) bool [source]¶
Compute the histogram on demand.
- Parameters:
forceComputeFlag (bool)
- Return type:
bool
- histoAction(self, actionName: str | None, actionFlag: bool = True)[source]¶
Apply a
histoActionTriggered()
event.- Parameters:
actionName (Optional[str])
actionFlag (bool = True)
- histoSaveAsImage(self, filename: str | None, width: int = 600, height: int = 600, quality: int = -1) bool [source]¶
Save the histogram as an image to disk
- Parameters:
filename (Optional[str])
width (int = 600)
height (int = 600)
quality (int = -1)
- Return type:
bool
- setActive(self, activeFlag: bool)[source]¶
Activate the histogram widget
- Parameters:
activeFlag (bool)
- setRendererWidget(self, name: str | None, rendererWidget: QgsRasterRendererWidget | None = None)[source]¶
Sets the renderer widget (or just its name if there is no widget)
- Parameters:
name (Optional[str])
rendererWidget (Optional[QgsRasterRendererWidget] = None)