QGIS API Documentation 3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
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.
 
void setAzimuth (double azimuth)
 Set the azimuth of the light source.
 
void setMultiDirectional (bool isMultiDirectional)
 Sets whether to render using a multi-directional hillshade algorithm.
 
void setZFactor (double zfactor)
 Set the Z scaling factor of the result image.
 

Public Member Functions

 QgsHillshadeRendererWidget (QgsRasterLayer *layer, const QgsRectangle &extent=QgsRectangle())
 Renderer widget for the hill shade renderer.
 
double altitude () const
 Returns the angle of the light source over the raster.
 
double azimuth () const
 Returns the direction of the light over the raster between 0-360.
 
bool multiDirectional () const
 Returns true if the renderer should use the multi-directional hillshade algorithm.
 
QgsRasterRendererrenderer () override
 Creates a new renderer, using the properties defined in the widget.
 
void setFromRenderer (const QgsRasterRenderer *renderer)
 Set the widget state from the given renderer.
 
double zFactor () const
 Returns the Z scaling factor.
 
- Public Member Functions inherited from QgsRasterRendererWidget
 QgsRasterRendererWidget (QgsRasterLayer *layer, const QgsRectangle &extent)
 
virtual QgsContrastEnhancement::ContrastEnhancementAlgorithm contrastEnhancementAlgorithm () const
 Returns the contrast enhancement algorithm to be used by the raster renderer.
 
virtual void doComputations ()
 Load programmatically with current values.
 
QgsMapCanvasmapCanvas ()
 Returns the map canvas associated with the widget.
 
virtual QString max (int index=0)
 
virtual QString min (int index=0)
 
virtual QgsRasterMinMaxWidgetminMaxWidget ()
 Returns min/max widget when it exists.
 
const QgsRasterLayerrasterLayer () const
 Returns the raster layer associated with the widget.
 
virtual int selectedBand (int index=0)
 
virtual void setContrastEnhancementAlgorithm (QgsContrastEnhancement::ContrastEnhancementAlgorithm algorithm)
 Sets the contrast enhancement algorithm to be used by the raster renderer.
 
virtual void setMapCanvas (QgsMapCanvas *canvas)
 Sets the map canvas associated with the widget.
 
virtual void setMax (const QString &value, int index=0)
 
virtual void setMin (const QString &value, int index=0)
 
void setRasterLayer (QgsRasterLayer *layer)
 Sets the raster layer associated with the widget.
 
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.
 

Additional Inherited Members

- Signals inherited from QgsRasterRendererWidget
void widgetChanged ()
 Emitted when something on the widget has changed.
 
- Protected Attributes inherited from QgsRasterRendererWidget
QgsMapCanvasmCanvas = nullptr
 Associated map canvas.
 
QgsRectangle mExtent
 Current extent.
 
QgsRasterLayermRasterLayer = nullptr
 

Detailed Description

Renderer widget for the hill shade renderer.

Definition at line 33 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 26 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 134 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 129 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 48 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 144 of file qgshillshaderendererwidget.cpp.

◆ renderer()

QgsRasterRenderer * QgsHillshadeRendererWidget::renderer ( )
overridevirtual

Creates a new renderer, using the properties defined in the widget.

The caller takes ownership of the returned renderer.

Implements QgsRasterRendererWidget.

Definition at line 57 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 91 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 96 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 78 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 106 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 101 of file qgshillshaderendererwidget.cpp.

◆ zFactor()

double QgsHillshadeRendererWidget::zFactor ( ) const

Returns the Z scaling factor.

See also
setZFactor()

Definition at line 139 of file qgshillshaderendererwidget.cpp.


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