QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
Signals | Public Member Functions | Protected Attributes | List of all members
QgsRasterRendererWidget Class Referenceabstract

Abstract base class for widgets which configure a QgsRasterRenderer. More...

#include <qgsrasterrendererwidget.h>

Inheritance diagram for QgsRasterRendererWidget:
Inheritance graph
[legend]

Signals

void widgetChanged ()
 Emitted when something on the widget has changed.
 

Public Member Functions

 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 QgsRasterRendererrenderer ()=0
 Creates a new renderer, using the properties defined in 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 ()
 

Protected Attributes

QgsMapCanvasmCanvas = nullptr
 Associated map canvas.
 
QgsRectangle mExtent
 Current extent.
 
QgsRasterLayermRasterLayer = nullptr
 

Detailed Description

Abstract base class for widgets which configure a QgsRasterRenderer.

Definition at line 39 of file qgsrasterrendererwidget.h.

Constructor & Destructor Documentation

◆ QgsRasterRendererWidget()

QgsRasterRendererWidget::QgsRasterRendererWidget ( QgsRasterLayer layer,
const QgsRectangle extent 
)
inline

Definition at line 46 of file qgsrasterrendererwidget.h.

Member Function Documentation

◆ contrastEnhancementAlgorithm()

virtual QgsContrastEnhancement::ContrastEnhancementAlgorithm QgsRasterRendererWidget::contrastEnhancementAlgorithm ( ) const
inlinevirtual

Returns the contrast enhancement algorithm to be used by the raster renderer.

Since
QGIS 3.26

Reimplemented in QgsMultiBandColorRendererWidget, and QgsSingleBandGrayRendererWidget.

Definition at line 104 of file qgsrasterrendererwidget.h.

◆ doComputations()

virtual void QgsRasterRendererWidget::doComputations ( )
inlinevirtual

Load programmatically with current values.

Reimplemented in QgsMultiBandColorRendererWidget, QgsSingleBandGrayRendererWidget, and QgsSingleBandPseudoColorRendererWidget.

Definition at line 95 of file qgsrasterrendererwidget.h.

◆ mapCanvas()

QgsMapCanvas * QgsRasterRendererWidget::mapCanvas ( )

Returns the map canvas associated with the widget.

See also
setMapCanvas()

Definition at line 29 of file qgsrasterrendererwidget.cpp.

◆ max()

virtual QString QgsRasterRendererWidget::max ( int  index = 0)
inlinevirtual

◆ min()

virtual QString QgsRasterRendererWidget::min ( int  index = 0)
inlinevirtual

◆ minMaxWidget()

virtual QgsRasterMinMaxWidget * QgsRasterRendererWidget::minMaxWidget ( )
inlinevirtual

Returns min/max widget when it exists.

Reimplemented in QgsMultiBandColorRendererWidget, QgsSingleBandGrayRendererWidget, and QgsSingleBandPseudoColorRendererWidget.

Definition at line 98 of file qgsrasterrendererwidget.h.

◆ rasterLayer()

const QgsRasterLayer * QgsRasterRendererWidget::rasterLayer ( ) const
inline

Returns the raster layer associated with the widget.

See also
setRasterLayer()

Definition at line 70 of file qgsrasterrendererwidget.h.

◆ renderer()

virtual QgsRasterRenderer * QgsRasterRendererWidget::renderer ( )
pure virtual

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

The caller takes ownership of the returned renderer.

Implemented in QgsHillshadeRendererWidget, QgsMultiBandColorRendererWidget, QgsPalettedRendererWidget, QgsRasterContourRendererWidget, QgsRasterSingleColorRendererWidget, QgsSingleBandGrayRendererWidget, and QgsSingleBandPseudoColorRendererWidget.

◆ selectedBand()

virtual int QgsRasterRendererWidget::selectedBand ( int  index = 0)
inlinevirtual

◆ setContrastEnhancementAlgorithm()

virtual void QgsRasterRendererWidget::setContrastEnhancementAlgorithm ( QgsContrastEnhancement::ContrastEnhancementAlgorithm  algorithm)
inlinevirtual

Sets the contrast enhancement algorithm to be used by the raster renderer.

Since
QGIS 3.26

Reimplemented in QgsMultiBandColorRendererWidget, and QgsSingleBandGrayRendererWidget.

Definition at line 110 of file qgsrasterrendererwidget.h.

◆ setMapCanvas()

void QgsRasterRendererWidget::setMapCanvas ( QgsMapCanvas canvas)
virtual

Sets the map canvas associated with the widget.

This allows the widget to retrieve the current map extent and other properties from the canvas.

Parameters
canvasmap canvas
See also
mapCanvas()

Reimplemented in QgsMultiBandColorRendererWidget, QgsSingleBandGrayRendererWidget, and QgsSingleBandPseudoColorRendererWidget.

Definition at line 24 of file qgsrasterrendererwidget.cpp.

◆ setMax()

virtual void QgsRasterRendererWidget::setMax ( const QString &  value,
int  index = 0 
)
inlinevirtual

◆ setMin()

virtual void QgsRasterRendererWidget::setMin ( const QString &  value,
int  index = 0 
)
inlinevirtual

◆ setRasterLayer()

void QgsRasterRendererWidget::setRasterLayer ( QgsRasterLayer layer)
inline

Sets the raster layer associated with the widget.

See also
rasterLayer()

Definition at line 63 of file qgsrasterrendererwidget.h.

◆ setStdDev()

virtual void QgsRasterRendererWidget::setStdDev ( const QString &  value)
inlinevirtual

Definition at line 91 of file qgsrasterrendererwidget.h.

◆ stdDev()

virtual QString QgsRasterRendererWidget::stdDev ( )
inlinevirtual

Definition at line 90 of file qgsrasterrendererwidget.h.

◆ widgetChanged

void QgsRasterRendererWidget::widgetChanged ( )
signal

Emitted when something on the widget has changed.

All widgets will fire this event to notify of an internal change.

Member Data Documentation

◆ mCanvas

QgsMapCanvas* QgsRasterRendererWidget::mCanvas = nullptr
protected

Associated map canvas.

Definition at line 127 of file qgsrasterrendererwidget.h.

◆ mExtent

QgsRectangle QgsRasterRendererWidget::mExtent
protected

Current extent.

Definition at line 124 of file qgsrasterrendererwidget.h.

◆ mRasterLayer

QgsRasterLayer* QgsRasterRendererWidget::mRasterLayer = nullptr
protected

Definition at line 121 of file qgsrasterrendererwidget.h.


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