QGIS API Documentation
3.18.1-Zürich (202f1bf7e5)
|
It has 2 ways how to use it. More...
#include <qgscolorrampshaderwidget.h>
Public Slots | |
void | classify () |
Executes the single band pseudo raster classification. More... | |
void | loadMinimumMaximumFromTree () |
Loads min and max values from color ramp tree. More... | |
Signals | |
void | classificationModeChanged (QgsColorRampShader::ClassificationMode mode) |
Classification mode changed. More... | |
void | minimumMaximumChangedFromTree (double minimum, double maximum) |
Color ramp tree has changed. More... | |
void | widgetChanged () |
Widget changed. More... | |
Public Member Functions | |
QgsColorRampShaderWidget (QWidget *parent=nullptr) | |
Creates new color ramp shader widget. More... | |
void | initializeForUseWithRasterLayer () |
Allows quantile classification mode for raster layers. More... | |
double | maximum () const |
Gets max value. More... | |
double | minimum () const |
Gets min value. More... | |
void | setExtent (const QgsRectangle &extent) |
Sets extent, only when used for raster layer. More... | |
void | setFromShader (const QgsColorRampShader &colorRampShader) |
Sets widget state from the color ramp shader. More... | |
void | setMinimumMaximum (double minimum, double maximum) |
Sets min max. More... | |
void | setMinimumMaximumAndClassify (double minimum, double maximum) |
Sets min max and classify color tree. More... | |
void | setRasterBand (int band) |
Sets raster band, only when used for raster layer. More... | |
void | setRasterDataProvider (QgsRasterDataProvider *dp) |
Associates raster with the widget, only when used for raster layer. More... | |
QgsColorRampShader | shader () const |
Returns shared function used in the renderer. More... | |
Protected Member Functions | |
void | populateColormapTreeWidget (const QList< QgsColorRampShader::ColorRampItem > &colorRampItems) |
Populates color ramp tree from ramp items. More... | |
It has 2 ways how to use it.
For raster layers, raster data provider and band is assigned and the Quantile classification mode can be used and the LoadFromBandButton is visible.
The other mode is used to style mesh layer contours (scalar datasets)
Definition at line 45 of file qgscolorrampshaderwidget.h.
QgsColorRampShaderWidget::QgsColorRampShaderWidget | ( | QWidget * | parent = nullptr | ) |
Creates new color ramp shader widget.
Definition at line 49 of file qgscolorrampshaderwidget.cpp.
|
signal |
Classification mode changed.
|
slot |
Executes the single band pseudo raster classification.
Definition at line 311 of file qgscolorrampshaderwidget.cpp.
void QgsColorRampShaderWidget::initializeForUseWithRasterLayer | ( | ) |
Allows quantile classification mode for raster layers.
Definition at line 118 of file qgscolorrampshaderwidget.cpp.
|
slot |
Loads min and max values from color ramp tree.
Definition at line 722 of file qgscolorrampshaderwidget.cpp.
double QgsColorRampShaderWidget::maximum | ( | ) | const |
Gets max value.
Definition at line 693 of file qgscolorrampshaderwidget.cpp.
double QgsColorRampShaderWidget::minimum | ( | ) | const |
Gets min value.
Definition at line 688 of file qgscolorrampshaderwidget.cpp.
|
signal |
Color ramp tree has changed.
|
protected |
Populates color ramp tree from ramp items.
Definition at line 427 of file qgscolorrampshaderwidget.cpp.
void QgsColorRampShaderWidget::setExtent | ( | const QgsRectangle & | extent | ) |
Sets extent, only when used for raster layer.
Definition at line 142 of file qgscolorrampshaderwidget.cpp.
void QgsColorRampShaderWidget::setFromShader | ( | const QgsColorRampShader & | colorRampShader | ) |
Sets widget state from the color ramp shader.
Definition at line 605 of file qgscolorrampshaderwidget.cpp.
void QgsColorRampShaderWidget::setMinimumMaximum | ( | double | minimum, |
double | maximum | ||
) |
Sets min max.
Definition at line 681 of file qgscolorrampshaderwidget.cpp.
void QgsColorRampShaderWidget::setMinimumMaximumAndClassify | ( | double | minimum, |
double | maximum | ||
) |
Sets min max and classify color tree.
Definition at line 672 of file qgscolorrampshaderwidget.cpp.
void QgsColorRampShaderWidget::setRasterBand | ( | int | band | ) |
Sets raster band, only when used for raster layer.
Definition at line 130 of file qgscolorrampshaderwidget.cpp.
void QgsColorRampShaderWidget::setRasterDataProvider | ( | QgsRasterDataProvider * | dp | ) |
Associates raster with the widget, only when used for raster layer.
Definition at line 124 of file qgscolorrampshaderwidget.cpp.
QgsColorRampShader QgsColorRampShaderWidget::shader | ( | ) | const |
Returns shared function used in the renderer.
Definition at line 147 of file qgscolorrampshaderwidget.cpp.
|
signal |
Widget changed.