Class: QgsRasterRendererWidget

class qgis.gui.QgsRasterRendererWidget

Bases: PyQt5.QtWidgets.QWidget

Abstract base class for widgets which configure a QgsRasterRenderer.

Methods

actionEvent

changeEvent

childEvent

closeEvent

connectNotify

contextMenuEvent

contrastEnhancementAlgorithm

Returns the constrast enhancement algorithm to be used by the raster renderer.

create

customEvent

destroy

disconnectNotify

doComputations

Load programmatically with current values

dragEnterEvent

dragLeaveEvent

dragMoveEvent

dropEvent

enterEvent

event

focusInEvent

focusNextChild

focusNextPrevChild

focusOutEvent

focusPreviousChild

hideEvent

initPainter

inputMethodEvent

isSignalConnected

keyPressEvent

keyReleaseEvent

leaveEvent

mapCanvas

Returns the map canvas associated with the widget.

max

param index

metric

min

param index

minMaxWidget

Returns min/max widget when it exists.

mouseDoubleClickEvent

mouseMoveEvent

mousePressEvent

mouseReleaseEvent

moveEvent

nativeEvent

paintEvent

rasterLayer

Returns the raster layer associated with the widget.

receivers

renderer

Creates a new renderer, using the properties defined in the widget.

resizeEvent

selectedBand

param index

sender

senderSignalIndex

setContrastEnhancementAlgorithm

Sets the constrast enhancement algorithm to be used by the raster renderer.

setMapCanvas

Sets the map canvas associated with the widget.

setMax

param value

setMin

param value

setRasterLayer

Sets the raster layer associated with the widget.

setStdDev

param value

sharedPainter

showEvent

stdDev

rtype

str

tabletEvent

timerEvent

updateMicroFocus

wheelEvent

Signals

widgetChanged

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

actionEvent(self, QActionEvent)
changeEvent(self, QEvent)
childEvent(self, QChildEvent)
closeEvent(self, QCloseEvent)
connectNotify(self, QMetaMethod)
contextMenuEvent(self, QContextMenuEvent)
contrastEnhancementAlgorithm(self) QgsContrastEnhancement.ContrastEnhancementAlgorithm

Returns the constrast enhancement algorithm to be used by the raster renderer.

New in version 3.26.

Return type

QgsContrastEnhancement.ContrastEnhancementAlgorithm

create(self, window: PyQt5.sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)
customEvent(self, QEvent)
destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True)
disconnectNotify(self, QMetaMethod)
doComputations(self)

Load programmatically with current values

dragEnterEvent(self, QDragEnterEvent)
dragLeaveEvent(self, QDragLeaveEvent)
dragMoveEvent(self, QDragMoveEvent)
dropEvent(self, QDropEvent)
enterEvent(self, QEvent)
event(self, QEvent) bool
focusInEvent(self, QFocusEvent)
focusNextChild(self) bool
focusNextPrevChild(self, bool) bool
focusOutEvent(self, QFocusEvent)
focusPreviousChild(self) bool
hideEvent(self, QHideEvent)
initPainter(self, QPainter)
inputMethodEvent(self, QInputMethodEvent)
isSignalConnected(self, QMetaMethod) bool
keyPressEvent(self, QKeyEvent)
keyReleaseEvent(self, QKeyEvent)
leaveEvent(self, QEvent)
mapCanvas(self) QgsMapCanvas

Returns the map canvas associated with the widget.

See also

setMapCanvas()

New in version 2.16.

Return type

QgsMapCanvas

max(self, index: int = 0) str
Parameters

index (int = 0) –

Return type

str

metric(self, QPaintDevice.PaintDeviceMetric) int
min(self, index: int = 0) str
Parameters

index (int = 0) –

Return type

str

minMaxWidget(self) QgsRasterMinMaxWidget

Returns min/max widget when it exists.

Return type

QgsRasterMinMaxWidget

mouseDoubleClickEvent(self, QMouseEvent)
mouseMoveEvent(self, QMouseEvent)
mousePressEvent(self, QMouseEvent)
mouseReleaseEvent(self, QMouseEvent)
moveEvent(self, QMoveEvent)
nativeEvent(self, Union[QByteArray, bytes, bytearray], PyQt5.sip.voidptr) Tuple[bool, int]
paintEvent(self, QPaintEvent)
rasterLayer(self) QgsRasterLayer

Returns the raster layer associated with the widget.

See also

setRasterLayer()

Return type

QgsRasterLayer

receivers(self, PYQT_SIGNAL) int
renderer(self) QgsRasterRenderer

Creates a new renderer, using the properties defined in the widget.

The caller takes ownership of the returned renderer.

Return type

QgsRasterRenderer

resizeEvent(self, QResizeEvent)
selectedBand(self, index: int = 0) int
Parameters

index (int = 0) –

Return type

int

sender(self) QObject
senderSignalIndex(self) int
setContrastEnhancementAlgorithm(self, algorithm: QgsContrastEnhancement.ContrastEnhancementAlgorithm)

Sets the constrast enhancement algorithm to be used by the raster renderer.

New in version 3.26.

Parameters

algorithm (QgsContrastEnhancement.ContrastEnhancementAlgorithm) –

setMapCanvas(self, canvas: QgsMapCanvas)

Sets the map canvas associated with the widget. This allows the widget to retrieve the current map extent and other properties from the canvas.

Parameters

canvas (QgsMapCanvas) – map canvas

See also

mapCanvas()

New in version 2.16.

setMax(self, value: str, index: int = 0)
Parameters
  • value (str) –

  • index (int = 0) –

setMin(self, value: str, index: int = 0)
Parameters
  • value (str) –

  • index (int = 0) –

setRasterLayer(self, layer: QgsRasterLayer)

Sets the raster layer associated with the widget.

See also

rasterLayer()

Parameters

layer (QgsRasterLayer) –

setStdDev(self, value: str)
Parameters

value (str) –

sharedPainter(self) QPainter
showEvent(self, QShowEvent)
stdDev(self) str
Return type

str

tabletEvent(self, QTabletEvent)
timerEvent(self, QTimerEvent)
updateMicroFocus(self)
wheelEvent(self, QWheelEvent)
widgetChanged

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.

Parameters
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type

PYQT_SIGNAL