QGIS API Documentation 3.29.0-Master (53715c36dc)
Public Slots | Public Member Functions | Static Public Member Functions | Friends | List of all members
QgsSingleBandPseudoColorRendererWidget Class Reference

Single band pseudo color renderer widget consists of a color ramp shader widget, a raster min max widget and a band selector. More...

#include <qgssinglebandpseudocolorrendererwidget.h>

Inheritance diagram for QgsSingleBandPseudoColorRendererWidget:
Inheritance graph
[legend]

Public Slots

void loadMinMax (int bandNo, double min, double max)
 called when new min/max values are loaded More...
 
void loadMinMaxFromTree (double min, double max)
 called when the color ramp tree has changed More...
 

Public Member Functions

 QgsSingleBandPseudoColorRendererWidget (QgsRasterLayer *layer, const QgsRectangle &extent=QgsRectangle())
 Creates new raster renderer widget. More...
 
void doComputations () override
 Load programmatically with current values. More...
 
QString max (int index=0) override
 
QString min (int index=0) override
 
QgsRasterMinMaxWidgetminMaxWidget () override
 Returns min/max widget when it exists. More...
 
QgsRasterRendererrenderer () override
 Creates a new renderer, using the properties defined in the widget. More...
 
int selectedBand (int index=0) override
 
void setFromRenderer (const QgsRasterRenderer *r)
 Sets the widget state from the specified renderer. More...
 
void setMapCanvas (QgsMapCanvas *canvas) override
 Sets the map canvas associated with the widget. More...
 
void setMax (const QString &value, int index=0) override
 
void setMin (const QString &value, int index=0) override
 
- Public Member Functions inherited from QgsRasterRendererWidget
 QgsRasterRendererWidget (QgsRasterLayer *layer, const QgsRectangle &extent)
 
virtual QgsContrastEnhancement::ContrastEnhancementAlgorithm contrastEnhancementAlgorithm () const
 Returns the constrast enhancement algorithm to be used by the raster renderer. More...
 
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
 Returns the raster layer associated with the widget. More...
 
virtual QgsRasterRendererrenderer ()=0
 Creates a new renderer, using the properties defined in the widget. More...
 
virtual int selectedBand (int index=0)
 
virtual void setContrastEnhancementAlgorithm (QgsContrastEnhancement::ContrastEnhancementAlgorithm algorithm)
 Sets the constrast enhancement algorithm to be used by the raster renderer. More...
 
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)
 Sets the raster layer associated with the widget. More...
 
virtual void setStdDev (const QString &value)
 
virtual QString stdDev ()
 

Static Public Member Functions

static QgsRasterRendererWidgetcreate (QgsRasterLayer *layer, const QgsRectangle &extent)
 Creates new raster renderer widget. More...
 

Friends

class TestQgsSingleBandPseudoColorRendererWidget
 

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

Single band pseudo color renderer widget consists of a color ramp shader widget, a raster min max widget and a band selector.

Definition at line 38 of file qgssinglebandpseudocolorrendererwidget.h.

Constructor & Destructor Documentation

◆ QgsSingleBandPseudoColorRendererWidget()

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

Creates new raster renderer widget.

Definition at line 45 of file qgssinglebandpseudocolorrendererwidget.cpp.

Member Function Documentation

◆ create()

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

Creates new raster renderer widget.

Definition at line 49 of file qgssinglebandpseudocolorrendererwidget.h.

◆ doComputations()

void QgsSingleBandPseudoColorRendererWidget::doComputations ( )
overridevirtual

Load programmatically with current values.

Reimplemented from QgsRasterRendererWidget.

Definition at line 129 of file qgssinglebandpseudocolorrendererwidget.cpp.

◆ loadMinMax

void QgsSingleBandPseudoColorRendererWidget::loadMinMax ( int  bandNo,
double  min,
double  max 
)
slot

called when new min/max values are loaded

Definition at line 184 of file qgssinglebandpseudocolorrendererwidget.cpp.

◆ loadMinMaxFromTree

void QgsSingleBandPseudoColorRendererWidget::loadMinMaxFromTree ( double  min,
double  max 
)
slot

called when the color ramp tree has changed

Definition at line 220 of file qgssinglebandpseudocolorrendererwidget.cpp.

◆ max()

QString QgsSingleBandPseudoColorRendererWidget::max ( int  index = 0)
inlineoverridevirtual

Reimplemented from QgsRasterRendererWidget.

Definition at line 62 of file qgssinglebandpseudocolorrendererwidget.h.

◆ min()

QString QgsSingleBandPseudoColorRendererWidget::min ( int  index = 0)
inlineoverridevirtual

Reimplemented from QgsRasterRendererWidget.

Definition at line 61 of file qgssinglebandpseudocolorrendererwidget.h.

◆ minMaxWidget()

QgsRasterMinMaxWidget * QgsSingleBandPseudoColorRendererWidget::minMaxWidget ( )
overridevirtual

Returns min/max widget when it exists.

Reimplemented from QgsRasterRendererWidget.

Definition at line 134 of file qgssinglebandpseudocolorrendererwidget.cpp.

◆ renderer()

QgsRasterRenderer * QgsSingleBandPseudoColorRendererWidget::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 111 of file qgssinglebandpseudocolorrendererwidget.cpp.

◆ selectedBand()

int QgsSingleBandPseudoColorRendererWidget::selectedBand ( int  index = 0)
inlineoverridevirtual

Reimplemented from QgsRasterRendererWidget.

Definition at line 65 of file qgssinglebandpseudocolorrendererwidget.h.

◆ setFromRenderer()

void QgsSingleBandPseudoColorRendererWidget::setFromRenderer ( const QgsRasterRenderer r)

Sets the widget state from the specified renderer.

Definition at line 143 of file qgssinglebandpseudocolorrendererwidget.cpp.

◆ setMapCanvas()

void QgsSingleBandPseudoColorRendererWidget::setMapCanvas ( QgsMapCanvas canvas)
overridevirtual

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()
Since
QGIS 2.16

Reimplemented from QgsRasterRendererWidget.

Definition at line 136 of file qgssinglebandpseudocolorrendererwidget.cpp.

◆ setMax()

void QgsSingleBandPseudoColorRendererWidget::setMax ( const QString &  value,
int  index = 0 
)
overridevirtual

Reimplemented from QgsRasterRendererWidget.

Definition at line 300 of file qgssinglebandpseudocolorrendererwidget.cpp.

◆ setMin()

void QgsSingleBandPseudoColorRendererWidget::setMin ( const QString &  value,
int  index = 0 
)
overridevirtual

Reimplemented from QgsRasterRendererWidget.

Definition at line 293 of file qgssinglebandpseudocolorrendererwidget.cpp.

Friends And Related Function Documentation

◆ TestQgsSingleBandPseudoColorRendererWidget

friend class TestQgsSingleBandPseudoColorRendererWidget
friend

Definition at line 92 of file qgssinglebandpseudocolorrendererwidget.h.


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