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

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

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

Emitted when something on the widget has changed.

actionEvent(self, QActionEvent)
changeEvent(self, QEvent)
childEvent(self, QChildEvent)
closeEvent(self, QCloseEvent)
connectNotify(self, QMetaMethod)
contextMenuEvent(self, QContextMenuEvent)
create(self, window: 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], 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
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

Emitted when something on the widget has changed. All widgets will fire this event to notify of an internal change. [signal]