Class: QgsHillshadeRendererWidget¶
- class qgis.gui.QgsHillshadeRendererWidget¶
Bases:
QgsRasterRendererWidget
Renderer widget for the hill shade renderer.
New in version 2.16.
QgsHillshadeRendererWidget(layer:
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:
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, QActionEvent)¶
- 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, QEvent)¶
- childEvent(self, QChildEvent)¶
- closeEvent(self, QCloseEvent)¶
- connectNotify(self, QMetaMethod)¶
- contextMenuEvent(self, QContextMenuEvent)¶
- create(layer: QgsRasterLayer, extent: QgsRectangle) QgsRasterRendererWidget ¶
Factory method to create the renderer for this type.
- Parameters:
layer (QgsRasterLayer) –
extent (QgsRectangle) –
- Return type:
- customEvent(self, QEvent)¶
- destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True)¶
- disconnectNotify(self, QMetaMethod)¶
- 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)¶
- metric(self, QPaintDevice.PaintDeviceMetric) int ¶
- mouseDoubleClickEvent(self, QMouseEvent)¶
- mouseMoveEvent(self, QMouseEvent)¶
- mousePressEvent(self, QMouseEvent)¶
- mouseReleaseEvent(self, QMouseEvent)¶
- moveEvent(self, QMoveEvent)¶
- multiDirectional(self) bool ¶
Returns
True
if the renderer should use the multi-directional hillshade algorithm.See also
- Return type:
bool
- nativeEvent(self, Union[QByteArray, bytes, bytearray], PyQt5.sip.voidptr) Tuple[bool, int] ¶
- paintEvent(self, QPaintEvent)¶
- receivers(self, PYQT_SIGNAL) int ¶
- renderer(self) QgsRasterRenderer ¶
- Return type:
- resizeEvent(self, QResizeEvent)¶
- sender(self) QObject ¶
- 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)¶
Set the widget state from the given renderer.
- Parameters:
renderer (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, QShowEvent)¶
- tabletEvent(self, QTabletEvent)¶
- timerEvent(self, QTimerEvent)¶
- updateMicroFocus(self)¶
- wheelEvent(self, QWheelEvent)¶
- zFactor(self) float ¶
Returns the Z scaling factor.
See also
- Return type:
float