QGIS API Documentation
3.18.1-Zürich (202f1bf7e5)
|
Renderer widget for the hill shade renderer. More...
#include <qgshillshaderendererwidget.h>
Public Slots | |
void | setAltitude (double altitude) |
Set the altitude of the light source. More... | |
void | setAzimuth (double azimuth) |
Set the azimuth of the light source. More... | |
void | setMultiDirectional (bool isMultiDirectional) |
Sets whether to render using a multi-directional hillshade algorithm. More... | |
void | setZFactor (double zfactor) |
Set the Z scaling factor of the result image. More... | |
Public Member Functions | |
QgsHillshadeRendererWidget (QgsRasterLayer *layer, const QgsRectangle &extent=QgsRectangle()) | |
Renderer widget for the hill shade renderer. More... | |
double | altitude () const |
Returns the angle of the light source over the raster. More... | |
double | azimuth () const |
Returns the direction of the light over the raster between 0-360. More... | |
bool | multiDirectional () const |
Returns true if the renderer should use the multi-directional hillshade algorithm. More... | |
QgsRasterRenderer * | renderer () override |
The renderer for the widget. More... | |
void | setFromRenderer (const QgsRasterRenderer *renderer) |
Set the widget state from the given renderer. More... | |
double | zFactor () const |
Returns the Z scaling factor. More... | |
Public Member Functions inherited from QgsRasterRendererWidget | |
QgsRasterRendererWidget (QgsRasterLayer *layer, const QgsRectangle &extent) | |
virtual void | doComputations () |
Load programmatically with current values. More... | |
QgsMapCanvas * | mapCanvas () |
Returns the map canvas associated with the widget. More... | |
virtual QString | max (int index=0) |
virtual QString | min (int index=0) |
virtual QgsRasterMinMaxWidget * | minMaxWidget () |
Returns min/max widget when it exists. More... | |
const QgsRasterLayer * | rasterLayer () const |
virtual int | selectedBand (int index=0) |
virtual void | setMapCanvas (QgsMapCanvas *canvas) |
Sets the map canvas associated with the widget. More... | |
virtual void | setMax (const QString &value, int index=0) |
virtual void | setMin (const QString &value, int index=0) |
void | setRasterLayer (QgsRasterLayer *layer) |
virtual void | setStdDev (const QString &value) |
virtual QString | stdDev () |
Static Public Member Functions | |
static QgsRasterRendererWidget * | create (QgsRasterLayer *layer, const QgsRectangle &extent) |
Factory method to create the renderer for this type. More... | |
Additional Inherited Members | |
Signals inherited from QgsRasterRendererWidget | |
void | widgetChanged () |
Emitted when something on the widget has changed. More... | |
Protected Attributes inherited from QgsRasterRendererWidget | |
QgsMapCanvas * | mCanvas = nullptr |
Associated map canvas. More... | |
QgsRectangle | mExtent |
Current extent. More... | |
QgsRasterLayer * | mRasterLayer = nullptr |
Renderer widget for the hill shade renderer.
Definition at line 34 of file qgshillshaderendererwidget.h.
QgsHillshadeRendererWidget::QgsHillshadeRendererWidget | ( | QgsRasterLayer * | layer, |
const QgsRectangle & | extent = QgsRectangle() |
||
) |
Renderer widget for the hill shade renderer.
layer | The layer attached for this widget. |
extent | The current extent. |
Definition at line 25 of file qgshillshaderendererwidget.cpp.
double QgsHillshadeRendererWidget::altitude | ( | ) | const |
Returns the angle of the light source over the raster.
Definition at line 133 of file qgshillshaderendererwidget.cpp.
double QgsHillshadeRendererWidget::azimuth | ( | ) | const |
Returns the direction of the light over the raster between 0-360.
Definition at line 128 of file qgshillshaderendererwidget.cpp.
|
inlinestatic |
Factory method to create the renderer for this type.
Definition at line 49 of file qgshillshaderendererwidget.h.
bool QgsHillshadeRendererWidget::multiDirectional | ( | ) | const |
Returns true
if the renderer should use the multi-directional hillshade algorithm.
Definition at line 143 of file qgshillshaderendererwidget.cpp.
|
overridevirtual |
The renderer for the widget.
Implements QgsRasterRendererWidget.
Definition at line 56 of file qgshillshaderendererwidget.cpp.
|
slot |
Set the altitude of the light source.
altitude | the altitude |
Definition at line 90 of file qgshillshaderendererwidget.cpp.
|
slot |
Set the azimuth of the light source.
azimuth | The azimuth of the light source, between 0 and 360.0 |
Definition at line 95 of file qgshillshaderendererwidget.cpp.
void QgsHillshadeRendererWidget::setFromRenderer | ( | const QgsRasterRenderer * | renderer | ) |
Set the widget state from the given renderer.
renderer | The renderer to take the state from. |
Definition at line 77 of file qgshillshaderendererwidget.cpp.
|
slot |
Sets whether to render using a multi-directional hillshade algorithm.
isMultiDirectional | set to true to use multi directional rendering |
Definition at line 105 of file qgshillshaderendererwidget.cpp.
|
slot |
Set the Z scaling factor of the result image.
zfactor | The z factor |
Definition at line 100 of file qgshillshaderendererwidget.cpp.
double QgsHillshadeRendererWidget::zFactor | ( | ) | const |
Returns the Z scaling factor.
Definition at line 138 of file qgshillshaderendererwidget.cpp.