QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
Public Member Functions | List of all members
QgsVectorColorRampV2 Class Referenceabstract

Abstract base class for color ramps. More...

#include <qgsvectorcolorrampv2.h>

Inheritance diagram for QgsVectorColorRampV2:
Inheritance graph
[legend]

Public Member Functions

virtual ~QgsVectorColorRampV2 ()
 
virtual QgsVectorColorRampV2clone () const =0
 Creates a clone of the color ramp. More...
 
virtual QColor color (double value) const =0
 Returns the color corresponding to a specified value. More...
 
virtual int count () const =0
 Returns number of defined colors, or -1 if undefined. More...
 
virtual QgsStringMap properties () const =0
 Returns a string map containing all the color ramp's properties. More...
 
virtual QString type () const =0
 Returns a string representing the color ramp type. More...
 
virtual double value (int index) const =0
 Returns relative value between [0,1] of color at specified index. More...
 

Detailed Description

Abstract base class for color ramps.

Definition at line 30 of file qgsvectorcolorrampv2.h.

Constructor & Destructor Documentation

◆ ~QgsVectorColorRampV2()

virtual QgsVectorColorRampV2::~QgsVectorColorRampV2 ( )
inlinevirtual

Definition at line 34 of file qgsvectorcolorrampv2.h.

Member Function Documentation

◆ clone()

virtual QgsVectorColorRampV2* QgsVectorColorRampV2::clone ( ) const
pure virtual

◆ color()

virtual QColor QgsVectorColorRampV2::color ( double  value) const
pure virtual

Returns the color corresponding to a specified value.

Parameters
valuevalue between [0, 1] inclusive
Returns
color for value

Implemented in QgsVectorColorBrewerColorRampV2, QgsRandomColorsV2, QgsVectorRandomColorRampV2, and QgsVectorGradientColorRampV2.

◆ count()

virtual int QgsVectorColorRampV2::count ( ) const
pure virtual

Returns number of defined colors, or -1 if undefined.

Implemented in QgsVectorColorBrewerColorRampV2, QgsRandomColorsV2, QgsVectorRandomColorRampV2, and QgsVectorGradientColorRampV2.

◆ properties()

virtual QgsStringMap QgsVectorColorRampV2::properties ( ) const
pure virtual

Returns a string map containing all the color ramp's properties.

Implemented in QgsCptCityColorRampV2, QgsVectorColorBrewerColorRampV2, QgsRandomColorsV2, QgsVectorRandomColorRampV2, and QgsVectorGradientColorRampV2.

◆ type()

virtual QString QgsVectorColorRampV2::type ( ) const
pure virtual

◆ value()

virtual double QgsVectorColorRampV2::value ( int  index) const
pure virtual

Returns relative value between [0,1] of color at specified index.

Implemented in QgsVectorColorBrewerColorRampV2, QgsRandomColorsV2, QgsVectorRandomColorRampV2, and QgsVectorGradientColorRampV2.


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