QGIS API Documentation  3.6.0-Noosa (5873452)
Public Slots | Public Member Functions | Static Public Member Functions | List of all members
QgsHillshadeRendererWidget Class Reference

Renderer widget for the hill shade renderer. More...

#include <qgshillshaderendererwidget.h>

Inheritance diagram for QgsHillshadeRendererWidget:
Inheritance graph
[legend]

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...
 
QgsRasterRendererrenderer () 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...
 
QgsMapCanvasmapCanvas ()
 Returns the map canvas associated with the widget. More...
 
virtual QString max (int index=0)
 
virtual QString min (int index=0)
 
virtual QgsRasterMinMaxWidgetminMaxWidget ()
 Returns min/max widget when it exists. More...
 
const QgsRasterLayerrasterLayer () 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 QgsRasterRendererWidgetcreate (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
QgsMapCanvasmCanvas = nullptr
 Associated map canvas. More...
 
QgsRectangle mExtent
 Current extent. More...
 
QgsRasterLayermRasterLayer = nullptr
 

Detailed Description

Renderer widget for the hill shade renderer.

Since
QGIS 2.16

Definition at line 34 of file qgshillshaderendererwidget.h.

Constructor & Destructor Documentation

◆ QgsHillshadeRendererWidget()

QgsHillshadeRendererWidget::QgsHillshadeRendererWidget ( QgsRasterLayer layer,
const QgsRectangle extent = QgsRectangle() 
)

Renderer widget for the hill shade renderer.

Parameters
layerThe layer attached for this widget.
extentThe current extent.

Definition at line 25 of file qgshillshaderendererwidget.cpp.

Member Function Documentation

◆ altitude()

double QgsHillshadeRendererWidget::altitude ( ) const

Returns the angle of the light source over the raster.

See also
setAltitude()

Definition at line 133 of file qgshillshaderendererwidget.cpp.

◆ azimuth()

double QgsHillshadeRendererWidget::azimuth ( ) const

Returns the direction of the light over the raster between 0-360.

See also
setAzimuth()

Definition at line 128 of file qgshillshaderendererwidget.cpp.

◆ create()

static QgsRasterRendererWidget* QgsHillshadeRendererWidget::create ( QgsRasterLayer layer,
const QgsRectangle extent 
)
inlinestatic

Factory method to create the renderer for this type.

Definition at line 49 of file qgshillshaderendererwidget.h.

◆ multiDirectional()

bool QgsHillshadeRendererWidget::multiDirectional ( ) const

Returns true if the renderer should use the multi-directional hillshade algorithm.

See also
setMultiDirectional()

Definition at line 143 of file qgshillshaderendererwidget.cpp.

◆ renderer()

QgsRasterRenderer * QgsHillshadeRendererWidget::renderer ( )
overridevirtual

The renderer for the widget.

Returns
A new renderer for the the config in the widget

Implements QgsRasterRendererWidget.

Definition at line 56 of file qgshillshaderendererwidget.cpp.

◆ setAltitude

void QgsHillshadeRendererWidget::setAltitude ( double  altitude)
slot

Set the altitude of the light source.

Parameters
altitudethe altitude
See also
altitude()

Definition at line 90 of file qgshillshaderendererwidget.cpp.

◆ setAzimuth

void QgsHillshadeRendererWidget::setAzimuth ( double  azimuth)
slot

Set the azimuth of the light source.

Parameters
azimuthThe azimuth of the light source, between 0 and 360.0
See also
azimuth()

Definition at line 95 of file qgshillshaderendererwidget.cpp.

◆ setFromRenderer()

void QgsHillshadeRendererWidget::setFromRenderer ( const QgsRasterRenderer renderer)

Set the widget state from the given renderer.

Parameters
rendererThe renderer to take the state from.

Definition at line 77 of file qgshillshaderendererwidget.cpp.

◆ setMultiDirectional

void QgsHillshadeRendererWidget::setMultiDirectional ( bool  isMultiDirectional)
slot

Sets whether to render using a multi-directional hillshade algorithm.

Parameters
isMultiDirectionalset to true to use multi directional rendering
See also
multiDirectional()

Definition at line 105 of file qgshillshaderendererwidget.cpp.

◆ setZFactor

void QgsHillshadeRendererWidget::setZFactor ( double  zfactor)
slot

Set the Z scaling factor of the result image.

Parameters
zfactorThe z factor
See also
zFactor()

Definition at line 100 of file qgshillshaderendererwidget.cpp.

◆ zFactor()

double QgsHillshadeRendererWidget::zFactor ( ) const

Returns the Z scaling factor.

See also
setZFactor()

Definition at line 138 of file qgshillshaderendererwidget.cpp.


The documentation for this class was generated from the following files: