Class: QgsHillshadeRendererWidget¶
- class qgis.gui.QgsHillshadeRendererWidget¶
Bases:
QgsRasterRendererWidget
Renderer widget for the hill shade renderer.
QgsHillshadeRendererWidget(layer: Optional[QgsRasterLayer], extent:
QgsRectangle
= QgsRectangle()) Renderer widget for the hill shade renderer.- Parameters:
layer – The layer attached for this widget.
extent –
The current extent.
Methods
Returns the angle of the light source over the raster.
Returns the direction of the light over the raster between 0-360.
Factory method to create the renderer for this type.
Returns
True
if the renderer should use the multi-directional hillshade algorithm.- rtype:
Optional[QgsRasterRenderer]
Set the altitude of the light source
Set the azimuth of the light source.
Set the widget state from the given renderer.
Sets whether to render using a multi-directional hillshade algorithm.
Set the Z scaling factor of the result image.
Returns the Z scaling factor.
- actionEvent(self, a0: QActionEvent | None)¶
- altitude(self) float ¶
Returns the angle of the light source over the raster.
See also
- Return type:
float
- azimuth(self) float ¶
Returns the direction of the light over the raster between 0-360.
See also
- Return type:
float
- changeEvent(self, a0: QEvent | None)¶
- childEvent(self, a0: QChildEvent | None)¶
- closeEvent(self, a0: QCloseEvent | None)¶
- connectNotify(self, signal: QMetaMethod)¶
- contextMenuEvent(self, a0: QContextMenuEvent | None)¶
- create(layer: QgsRasterLayer | None, extent: QgsRectangle) QgsRasterRendererWidget | None ¶
Factory method to create the renderer for this type.
- Parameters:
layer (Optional[QgsRasterLayer])
extent (QgsRectangle)
- Return type:
Optional[QgsRasterRendererWidget]
- customEvent(self, a0: QEvent | None)¶
- destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True)¶
- disconnectNotify(self, signal: QMetaMethod)¶
- dragEnterEvent(self, a0: QDragEnterEvent | None)¶
- dragLeaveEvent(self, a0: QDragLeaveEvent | None)¶
- dragMoveEvent(self, a0: QDragMoveEvent | None)¶
- dropEvent(self, a0: QDropEvent | None)¶
- enterEvent(self, a0: QEvent | None)¶
- event(self, a0: QEvent | None) bool ¶
- focusInEvent(self, a0: QFocusEvent | None)¶
- focusNextChild(self) bool ¶
- focusNextPrevChild(self, next: bool) bool ¶
- focusOutEvent(self, a0: QFocusEvent | None)¶
- focusPreviousChild(self) bool ¶
- hideEvent(self, a0: QHideEvent | None)¶
- initPainter(self, painter: QPainter | None)¶
- inputMethodEvent(self, a0: QInputMethodEvent | None)¶
- isSignalConnected(self, signal: QMetaMethod) bool ¶
- keyPressEvent(self, a0: QKeyEvent | None)¶
- keyReleaseEvent(self, a0: QKeyEvent | None)¶
- leaveEvent(self, a0: QEvent | None)¶
- metric(self, a0: QPaintDevice.PaintDeviceMetric) int ¶
- mouseDoubleClickEvent(self, a0: QMouseEvent | None)¶
- mouseMoveEvent(self, a0: QMouseEvent | None)¶
- mousePressEvent(self, a0: QMouseEvent | None)¶
- mouseReleaseEvent(self, a0: QMouseEvent | None)¶
- moveEvent(self, a0: QMoveEvent | None)¶
- multiDirectional(self) bool ¶
Returns
True
if the renderer should use the multi-directional hillshade algorithm.See also
- Return type:
bool
- nativeEvent(self, eventType: QByteArray | bytes | bytearray, message: PyQt5.sip.voidptr | None)¶
- paintEvent(self, a0: QPaintEvent | None)¶
- receivers(self, signal: PYQT_SIGNAL) int ¶
- renderer(self) QgsRasterRenderer | None ¶
- Return type:
Optional[QgsRasterRenderer]
- resizeEvent(self, a0: QResizeEvent | None)¶
- sender(self) QObject | None ¶
- senderSignalIndex(self) int ¶
- setAltitude(self, altitude: float)¶
Set the altitude of the light source
- Parameters:
altitude (float) – the altitude
See also
- setAzimuth(self, azimuth: float)¶
Set the azimuth of the light source.
- Parameters:
azimuth (float) – The azimuth of the light source, between 0 and 360.0
See also
- setFromRenderer(self, renderer: QgsRasterRenderer | None)¶
Set the widget state from the given renderer.
- Parameters:
renderer (Optional[QgsRasterRenderer]) – The renderer to take the state from.
- setMultiDirectional(self, isMultiDirectional: bool)¶
Sets whether to render using a multi-directional hillshade algorithm.
- Parameters:
isMultiDirectional (bool) – set to
True
to use multi directional rendering
See also
- setZFactor(self, zfactor: float)¶
Set the Z scaling factor of the result image.
- Parameters:
zfactor (float) – The z factor
See also
- showEvent(self, a0: QShowEvent | None)¶
- tabletEvent(self, a0: QTabletEvent | None)¶
- timerEvent(self, a0: QTimerEvent | None)¶
- updateMicroFocus(self)¶
- wheelEvent(self, a0: QWheelEvent | None)¶
- zFactor(self) float ¶
Returns the Z scaling factor.
See also
- Return type:
float