Class: QgsRasterRendererWidget¶
- class qgis.gui.QgsRasterRendererWidget¶
Bases:
PyQt5.QtWidgets.QWidget
Abstract base class for widgets which configure a
QgsRasterRenderer
.Methods
Returns the constrast enhancement
algorithm
to be used by the raster renderer.Load programmatically with current values
Returns the map canvas associated with the widget.
- param index:
- param index:
Returns min/max widget when it exists.
Returns the raster layer associated with the widget.
Creates a new renderer, using the properties defined in the widget.
- param index:
Sets the constrast enhancement
algorithm
to be used by the raster renderer.Sets the map canvas associated with the widget.
- param value:
- param value:
Sets the raster
layer
associated with the widget.- param value:
- rtype:
str
Signals
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:
- 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
New in version 2.16.
- Return type:
- 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:
- 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
- Return type:
- 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:
- 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
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
- Parameters:
layer (QgsRasterLayer) –
- setStdDev(self, value: str)¶
- Parameters:
value (str) –
- 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