QGIS API Documentation 3.41.0-Master (cea29feecf2)
|
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>
Public Slots | |
void | loadMinMax (int bandNo, double min, double max) |
called when new min/max values are loaded | |
void | loadMinMaxFromTree (double min, double max) |
called when the color ramp tree has changed | |
Public Member Functions | |
QgsSingleBandPseudoColorRendererWidget (QgsRasterLayer *layer, const QgsRectangle &extent=QgsRectangle()) | |
Creates new raster renderer widget. | |
void | doComputations () override |
Load programmatically with current values. | |
QString | max (int index=0) override |
QString | min (int index=0) override |
QgsRasterMinMaxWidget * | minMaxWidget () override |
Returns min/max widget when it exists. | |
QgsRasterRenderer * | renderer () override |
Creates a new renderer, using the properties defined in the widget. | |
int | selectedBand (int index=0) override |
void | setFromRenderer (const QgsRasterRenderer *r) |
Sets the widget state from the specified renderer. | |
void | setMapCanvas (QgsMapCanvas *canvas) override |
Sets the map canvas associated with the widget. | |
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 contrast enhancement algorithm to be used by the raster renderer. | |
QgsMapCanvas * | mapCanvas () |
Returns the map canvas associated with the widget. | |
const QgsRasterLayer * | rasterLayer () const |
Returns the raster layer associated with the widget. | |
virtual void | setContrastEnhancementAlgorithm (QgsContrastEnhancement::ContrastEnhancementAlgorithm algorithm) |
Sets the contrast enhancement algorithm to be used by the raster renderer. | |
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 QgsRasterRendererWidget * | create (QgsRasterLayer *layer, const QgsRectangle &extent) |
Creates new raster renderer widget. | |
Friends | |
class | TestQgsSingleBandPseudoColorRendererWidget |
Additional Inherited Members | |
Signals inherited from QgsRasterRendererWidget | |
void | widgetChanged () |
Emitted when something on the widget has changed. | |
Protected Attributes inherited from QgsRasterRendererWidget | |
QgsMapCanvas * | mCanvas = nullptr |
Associated map canvas. | |
QgsRectangle | mExtent |
Current extent. | |
QgsRasterLayer * | mRasterLayer = nullptr |
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.
QgsSingleBandPseudoColorRendererWidget::QgsSingleBandPseudoColorRendererWidget | ( | QgsRasterLayer * | layer, |
const QgsRectangle & | extent = QgsRectangle() |
||
) |
Creates new raster renderer widget.
Definition at line 39 of file qgssinglebandpseudocolorrendererwidget.cpp.
|
inlinestatic |
Creates new raster renderer widget.
Definition at line 47 of file qgssinglebandpseudocolorrendererwidget.h.
|
overridevirtual |
Load programmatically with current values.
Reimplemented from QgsRasterRendererWidget.
Definition at line 123 of file qgssinglebandpseudocolorrendererwidget.cpp.
|
slot |
called when new min/max values are loaded
Definition at line 178 of file qgssinglebandpseudocolorrendererwidget.cpp.
|
slot |
called when the color ramp tree has changed
Definition at line 214 of file qgssinglebandpseudocolorrendererwidget.cpp.
|
inlineoverridevirtual |
Reimplemented from QgsRasterRendererWidget.
Definition at line 64 of file qgssinglebandpseudocolorrendererwidget.h.
|
inlineoverridevirtual |
Reimplemented from QgsRasterRendererWidget.
Definition at line 59 of file qgssinglebandpseudocolorrendererwidget.h.
|
overridevirtual |
Returns min/max widget when it exists.
Reimplemented from QgsRasterRendererWidget.
Definition at line 128 of file qgssinglebandpseudocolorrendererwidget.cpp.
|
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 105 of file qgssinglebandpseudocolorrendererwidget.cpp.
|
inlineoverridevirtual |
Reimplemented from QgsRasterRendererWidget.
Definition at line 71 of file qgssinglebandpseudocolorrendererwidget.h.
void QgsSingleBandPseudoColorRendererWidget::setFromRenderer | ( | const QgsRasterRenderer * | r | ) |
Sets the widget state from the specified renderer.
Definition at line 137 of file qgssinglebandpseudocolorrendererwidget.cpp.
|
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.
canvas | map canvas |
Reimplemented from QgsRasterRendererWidget.
Definition at line 130 of file qgssinglebandpseudocolorrendererwidget.cpp.
|
overridevirtual |
Reimplemented from QgsRasterRendererWidget.
Definition at line 294 of file qgssinglebandpseudocolorrendererwidget.cpp.
|
overridevirtual |
Reimplemented from QgsRasterRendererWidget.
Definition at line 287 of file qgssinglebandpseudocolorrendererwidget.cpp.
|
friend |
Definition at line 102 of file qgssinglebandpseudocolorrendererwidget.h.