QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
QgsVectorColorBrewerColorRampV2 Class Reference

#include <qgsvectorcolorrampv2.h>

Inheritance diagram for QgsVectorColorBrewerColorRampV2:
Inheritance graph
[legend]

Public Member Functions

 QgsVectorColorBrewerColorRampV2 (const QString &schemeName=DEFAULT_COLORBREWER_SCHEMENAME, int colors=DEFAULT_COLORBREWER_COLORS)
 
virtual QgsVectorColorBrewerColorRampV2clone () const override
 Creates a clone of the color ramp. More...
 
virtual QColor color (double value) const override
 Returns the color corresponding to a specified value. More...
 
int colors () const
 
virtual int count () const override
 Returns number of defined colors, or -1 if undefined. More...
 
virtual QgsStringMap properties () const override
 Returns a string map containing all the color ramp's properties. More...
 
QString schemeName () const
 
void setColors (int colors)
 
void setSchemeName (const QString &schemeName)
 
virtual QString type () const override
 Returns a string representing the color ramp type. More...
 
virtual double value (int index) const override
 Returns relative value between [0,1] of color at specified index. More...
 
- Public Member Functions inherited from QgsVectorColorRampV2
virtual ~QgsVectorColorRampV2 ()
 

Static Public Member Functions

static QgsVectorColorRampV2create (const QgsStringMap &properties=QgsStringMap())
 
static QStringList listSchemeNames ()
 
static QList< int > listSchemeVariants (const QString &schemeName)
 

Protected Member Functions

void loadPalette ()
 

Protected Attributes

int mColors
 
QList< QColormPalette
 
QString mSchemeName
 

Detailed Description

Definition at line 325 of file qgsvectorcolorrampv2.h.

Constructor & Destructor Documentation

◆ QgsVectorColorBrewerColorRampV2()

QgsVectorColorBrewerColorRampV2::QgsVectorColorBrewerColorRampV2 ( const QString schemeName = DEFAULT_COLORBREWER_SCHEMENAME,
int  colors = DEFAULT_COLORBREWER_COLORS 
)

Definition at line 476 of file qgsvectorcolorrampv2.cpp.

Member Function Documentation

◆ clone()

QgsVectorColorBrewerColorRampV2 * QgsVectorColorBrewerColorRampV2::clone ( ) const
overridevirtual

Creates a clone of the color ramp.

Implements QgsVectorColorRampV2.

Definition at line 528 of file qgsvectorcolorrampv2.cpp.

◆ color()

QColor QgsVectorColorBrewerColorRampV2::color ( double  value) const
overridevirtual

Returns the color corresponding to a specified value.

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

Implements QgsVectorColorRampV2.

Definition at line 517 of file qgsvectorcolorrampv2.cpp.

◆ colors()

int QgsVectorColorBrewerColorRampV2::colors ( ) const
inline

Definition at line 345 of file qgsvectorcolorrampv2.h.

◆ count()

virtual int QgsVectorColorBrewerColorRampV2::count ( ) const
inlineoverridevirtual

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

Implements QgsVectorColorRampV2.

Definition at line 344 of file qgsvectorcolorrampv2.h.

◆ create()

QgsVectorColorRampV2 * QgsVectorColorBrewerColorRampV2::create ( const QgsStringMap properties = QgsStringMap())
static

Definition at line 483 of file qgsvectorcolorrampv2.cpp.

◆ listSchemeNames()

QStringList QgsVectorColorBrewerColorRampV2::listSchemeNames ( )
static

Definition at line 501 of file qgsvectorcolorrampv2.cpp.

◆ listSchemeVariants()

QList< int > QgsVectorColorBrewerColorRampV2::listSchemeVariants ( const QString schemeName)
static

Definition at line 506 of file qgsvectorcolorrampv2.cpp.

◆ loadPalette()

void QgsVectorColorBrewerColorRampV2::loadPalette ( )
protected

Definition at line 496 of file qgsvectorcolorrampv2.cpp.

◆ properties()

QgsStringMap QgsVectorColorBrewerColorRampV2::properties ( ) const
overridevirtual

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

Implements QgsVectorColorRampV2.

Definition at line 533 of file qgsvectorcolorrampv2.cpp.

◆ schemeName()

QString QgsVectorColorBrewerColorRampV2::schemeName ( ) const
inline

Definition at line 343 of file qgsvectorcolorrampv2.h.

◆ setColors()

void QgsVectorColorBrewerColorRampV2::setColors ( int  colors)
inline

Definition at line 348 of file qgsvectorcolorrampv2.h.

◆ setSchemeName()

void QgsVectorColorBrewerColorRampV2::setSchemeName ( const QString schemeName)
inline

Definition at line 347 of file qgsvectorcolorrampv2.h.

◆ type()

virtual QString QgsVectorColorBrewerColorRampV2::type ( ) const
inlineoverridevirtual

Returns a string representing the color ramp type.

Implements QgsVectorColorRampV2.

Definition at line 337 of file qgsvectorcolorrampv2.h.

◆ value()

double QgsVectorColorBrewerColorRampV2::value ( int  index) const
overridevirtual

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

Implements QgsVectorColorRampV2.

Definition at line 511 of file qgsvectorcolorrampv2.cpp.

Member Data Documentation

◆ mColors

int QgsVectorColorBrewerColorRampV2::mColors
protected

Definition at line 358 of file qgsvectorcolorrampv2.h.

◆ mPalette

QList<QColor> QgsVectorColorBrewerColorRampV2::mPalette
protected

Definition at line 359 of file qgsvectorcolorrampv2.h.

◆ mSchemeName

QString QgsVectorColorBrewerColorRampV2::mSchemeName
protected

Definition at line 357 of file qgsvectorcolorrampv2.h.


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