QGIS API Documentation  2.15.0-Master (02a0ebe)
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 319 of file qgsvectorcolorrampv2.h.

Constructor & Destructor Documentation

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

Definition at line 473 of file qgsvectorcolorrampv2.cpp.

Member Function Documentation

QgsVectorColorBrewerColorRampV2 * QgsVectorColorBrewerColorRampV2::clone ( ) const
overridevirtual

Creates a clone of the color ramp.

Implements QgsVectorColorRampV2.

Definition at line 525 of file qgsvectorcolorrampv2.cpp.

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 514 of file qgsvectorcolorrampv2.cpp.

int QgsVectorColorBrewerColorRampV2::colors ( ) const
inline

Definition at line 339 of file qgsvectorcolorrampv2.h.

virtual int QgsVectorColorBrewerColorRampV2::count ( ) const
inlineoverridevirtual

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

Implements QgsVectorColorRampV2.

Definition at line 338 of file qgsvectorcolorrampv2.h.

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

Definition at line 480 of file qgsvectorcolorrampv2.cpp.

QStringList QgsVectorColorBrewerColorRampV2::listSchemeNames ( )
static

Definition at line 498 of file qgsvectorcolorrampv2.cpp.

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

Definition at line 503 of file qgsvectorcolorrampv2.cpp.

void QgsVectorColorBrewerColorRampV2::loadPalette ( )
protected

Definition at line 493 of file qgsvectorcolorrampv2.cpp.

QgsStringMap QgsVectorColorBrewerColorRampV2::properties ( ) const
overridevirtual

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

Implements QgsVectorColorRampV2.

Definition at line 530 of file qgsvectorcolorrampv2.cpp.

QString QgsVectorColorBrewerColorRampV2::schemeName ( ) const
inline

Definition at line 337 of file qgsvectorcolorrampv2.h.

void QgsVectorColorBrewerColorRampV2::setColors ( int  colors)
inline

Definition at line 342 of file qgsvectorcolorrampv2.h.

void QgsVectorColorBrewerColorRampV2::setSchemeName ( const QString schemeName)
inline

Definition at line 341 of file qgsvectorcolorrampv2.h.

virtual QString QgsVectorColorBrewerColorRampV2::type ( ) const
inlineoverridevirtual

Returns a string representing the color ramp type.

Implements QgsVectorColorRampV2.

Definition at line 331 of file qgsvectorcolorrampv2.h.

double QgsVectorColorBrewerColorRampV2::value ( int  index) const
overridevirtual

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

Implements QgsVectorColorRampV2.

Definition at line 508 of file qgsvectorcolorrampv2.cpp.

Member Data Documentation

int QgsVectorColorBrewerColorRampV2::mColors
protected

Definition at line 352 of file qgsvectorcolorrampv2.h.

QList<QColor> QgsVectorColorBrewerColorRampV2::mPalette
protected

Definition at line 353 of file qgsvectorcolorrampv2.h.

QString QgsVectorColorBrewerColorRampV2::mSchemeName
protected

Definition at line 351 of file qgsvectorcolorrampv2.h.


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