QGIS API Documentation 3.99.0-Master (e9821da5c6b)
Loading...
Searching...
No Matches
QgsColorRampShaderWidget Class Reference

A widget for configuring numeric ranges associated with a color ramp. More...

#include <qgscolorrampshaderwidget.h>

Inheritance diagram for QgsColorRampShaderWidget:

Public Slots

void classify ()
 Executes the single band pseudo raster classification.
void loadMinimumMaximumFromTree ()
 Loads min and max values from color ramp tree.

Signals

void classificationModeChanged (Qgis::ShaderClassificationMethod mode)
 Classification mode changed.
void minimumMaximumChangedFromTree (double minimum, double maximum)
 Color ramp tree has changed.
void widgetChanged ()
 Widget changed.

Public Member Functions

 QgsColorRampShaderWidget (QWidget *parent=nullptr)
 Creates new color ramp shader widget.
 ~QgsColorRampShaderWidget () override
void initializeForUseWithRasterLayer ()
 Allows quantile classification mode for raster layers.
double maximum () const
 Gets max value.
double minimum () const
 Gets min value.
void setExtent (const QgsRectangle &extent)
 Sets extent, only when used for raster layer.
void setFromShader (const QgsColorRampShader &colorRampShader)
 Sets widget state from the color ramp shader.
void setMinimumMaximum (double minimum, double maximum)
 Sets min max.
void setMinimumMaximumAndClassify (double minimum, double maximum)
 Sets min max and classify color tree.
void setRasterBand (int band)
 Sets raster band, only when used for raster layer.
void setRasterDataProvider (QgsRasterDataProvider *dp)
 Associates raster with the widget, only when used for raster layer.
QgsColorRampShader shader () const
 Returns shared function used in the renderer.

Protected Member Functions

void populateColormapTreeWidget (const QList< QgsColorRampShader::ColorRampItem > &colorRampItems)
 Populates color ramp tree from ramp items.

Detailed Description

A widget for configuring numeric ranges associated with a color ramp.

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)

Since
QGIS 3.4

Definition at line 49 of file qgscolorrampshaderwidget.h.

Constructor & Destructor Documentation

◆ QgsColorRampShaderWidget()

QgsColorRampShaderWidget::QgsColorRampShaderWidget ( QWidget * parent = nullptr)

Creates new color ramp shader widget.

Definition at line 46 of file qgscolorrampshaderwidget.cpp.

◆ ~QgsColorRampShaderWidget()

QgsColorRampShaderWidget::~QgsColorRampShaderWidget ( )
overridedefault

Member Function Documentation

◆ classificationModeChanged

void QgsColorRampShaderWidget::classificationModeChanged ( Qgis::ShaderClassificationMethod mode)
signal

Classification mode changed.

◆ classify

void QgsColorRampShaderWidget::classify ( )
slot

Executes the single band pseudo raster classification.

Definition at line 303 of file qgscolorrampshaderwidget.cpp.

◆ initializeForUseWithRasterLayer()

void QgsColorRampShaderWidget::initializeForUseWithRasterLayer ( )

Allows quantile classification mode for raster layers.

Definition at line 115 of file qgscolorrampshaderwidget.cpp.

◆ loadMinimumMaximumFromTree

void QgsColorRampShaderWidget::loadMinimumMaximumFromTree ( )
slot

Loads min and max values from color ramp tree.

Definition at line 721 of file qgscolorrampshaderwidget.cpp.

◆ maximum()

double QgsColorRampShaderWidget::maximum ( ) const

Gets max value.

Definition at line 692 of file qgscolorrampshaderwidget.cpp.

◆ minimum()

double QgsColorRampShaderWidget::minimum ( ) const

Gets min value.

Definition at line 687 of file qgscolorrampshaderwidget.cpp.

◆ minimumMaximumChangedFromTree

void QgsColorRampShaderWidget::minimumMaximumChangedFromTree ( double minimum,
double maximum )
signal

Color ramp tree has changed.

◆ populateColormapTreeWidget()

void QgsColorRampShaderWidget::populateColormapTreeWidget ( const QList< QgsColorRampShader::ColorRampItem > & colorRampItems)
protected

Populates color ramp tree from ramp items.

Definition at line 416 of file qgscolorrampshaderwidget.cpp.

◆ setExtent()

void QgsColorRampShaderWidget::setExtent ( const QgsRectangle & extent)

Sets extent, only when used for raster layer.

Definition at line 139 of file qgscolorrampshaderwidget.cpp.

◆ setFromShader()

void QgsColorRampShaderWidget::setFromShader ( const QgsColorRampShader & colorRampShader)

Sets widget state from the color ramp shader.

Definition at line 601 of file qgscolorrampshaderwidget.cpp.

◆ setMinimumMaximum()

void QgsColorRampShaderWidget::setMinimumMaximum ( double minimum,
double maximum )

Sets min max.

Definition at line 680 of file qgscolorrampshaderwidget.cpp.

◆ setMinimumMaximumAndClassify()

void QgsColorRampShaderWidget::setMinimumMaximumAndClassify ( double minimum,
double maximum )

Sets min max and classify color tree.

Definition at line 671 of file qgscolorrampshaderwidget.cpp.

◆ setRasterBand()

void QgsColorRampShaderWidget::setRasterBand ( int band)

Sets raster band, only when used for raster layer.

Definition at line 127 of file qgscolorrampshaderwidget.cpp.

◆ setRasterDataProvider()

void QgsColorRampShaderWidget::setRasterDataProvider ( QgsRasterDataProvider * dp)

Associates raster with the widget, only when used for raster layer.

Definition at line 121 of file qgscolorrampshaderwidget.cpp.

◆ shader()

QgsColorRampShader QgsColorRampShaderWidget::shader ( ) const

Returns shared function used in the renderer.

Definition at line 144 of file qgscolorrampshaderwidget.cpp.

◆ widgetChanged

void QgsColorRampShaderWidget::widgetChanged ( )
signal

Widget changed.


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