QGIS API Documentation  2.11.0-Master
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
QgsVectorGradientColorRampV2 Class Reference

#include <qgsvectorcolorrampv2.h>

Inheritance diagram for QgsVectorGradientColorRampV2:
Inheritance graph
[legend]

Public Member Functions

 QgsVectorGradientColorRampV2 (QColor color1=DEFAULT_GRADIENT_COLOR1, QColor color2=DEFAULT_GRADIENT_COLOR2, bool discrete=false, QgsGradientStopsList stops=QgsGradientStopsList())
 
void addStopsToGradient (QGradient *gradient, double alpha=1)
 Copy color ramp stops to a QGradient. More...
 
virtual QgsVectorColorRampV2clone () const override
 
virtual QColor color (double value) const override
 
QColor color1 () const
 
QColor color2 () const
 
void convertToDiscrete (bool discrete)
 
virtual int count () const override
 Returns number of defined colors, or -1 if undefined. More...
 
QgsStringMap info () const
 
bool isDiscrete () const
 
virtual QgsStringMap properties () const override
 
void setColor1 (QColor color)
 
void setColor2 (QColor color)
 
void setDiscrete (bool discrete)
 
void setInfo (const QgsStringMap &info)
 
void setStops (const QgsGradientStopsList &stops)
 
const QgsGradientStopsListstops () const
 
virtual QString type () const override
 
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())
 

Protected Attributes

QColor mColor1
 
QColor mColor2
 
bool mDiscrete
 
QgsStringMap mInfo
 
QgsGradientStopsList mStops
 

Detailed Description

Definition at line 61 of file qgsvectorcolorrampv2.h.

Constructor & Destructor Documentation

QgsVectorGradientColorRampV2::QgsVectorGradientColorRampV2 ( QColor  color1 = DEFAULT_GRADIENT_COLOR1,
QColor  color2 = DEFAULT_GRADIENT_COLOR2,
bool  discrete = false,
QgsGradientStopsList  stops = QgsGradientStopsList() 
)

Definition at line 44 of file qgsvectorcolorrampv2.cpp.

Member Function Documentation

void QgsVectorGradientColorRampV2::addStopsToGradient ( QGradient gradient,
double  alpha = 1 
)

Copy color ramp stops to a QGradient.

Note
added in 2.1

Definition at line 234 of file qgsvectorcolorrampv2.cpp.

QgsVectorColorRampV2 * QgsVectorGradientColorRampV2::clone ( ) const
overridevirtual

Implements QgsVectorColorRampV2.

Reimplemented in QgsCptCityColorRampV2.

Definition at line 159 of file qgsvectorcolorrampv2.cpp.

QColor QgsVectorGradientColorRampV2::color ( double  value) const
overridevirtual

Implements QgsVectorColorRampV2.

Definition at line 113 of file qgsvectorcolorrampv2.cpp.

QColor QgsVectorGradientColorRampV2::color1 ( ) const
inline

Definition at line 83 of file qgsvectorcolorrampv2.h.

QColor QgsVectorGradientColorRampV2::color2 ( ) const
inline

Definition at line 84 of file qgsvectorcolorrampv2.h.

void QgsVectorGradientColorRampV2::convertToDiscrete ( bool  discrete)

Definition at line 192 of file qgsvectorcolorrampv2.cpp.

virtual int QgsVectorGradientColorRampV2::count ( ) const
inlineoverridevirtual

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

Implements QgsVectorColorRampV2.

Definition at line 71 of file qgsvectorcolorrampv2.h.

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

Definition at line 50 of file qgsvectorcolorrampv2.cpp.

QgsStringMap QgsVectorGradientColorRampV2::info ( ) const
inline

Definition at line 95 of file qgsvectorcolorrampv2.h.

bool QgsVectorGradientColorRampV2::isDiscrete ( ) const
inline

Definition at line 88 of file qgsvectorcolorrampv2.h.

QgsStringMap QgsVectorGradientColorRampV2::properties ( ) const
overridevirtual

Implements QgsVectorColorRampV2.

Reimplemented in QgsCptCityColorRampV2.

Definition at line 167 of file qgsvectorcolorrampv2.cpp.

void QgsVectorGradientColorRampV2::setColor1 ( QColor  color)
inline

Definition at line 85 of file qgsvectorcolorrampv2.h.

void QgsVectorGradientColorRampV2::setColor2 ( QColor  color)
inline

Definition at line 86 of file qgsvectorcolorrampv2.h.

void QgsVectorGradientColorRampV2::setDiscrete ( bool  discrete)
inline

Definition at line 89 of file qgsvectorcolorrampv2.h.

void QgsVectorGradientColorRampV2::setInfo ( const QgsStringMap info)
inline

Definition at line 96 of file qgsvectorcolorrampv2.h.

void QgsVectorGradientColorRampV2::setStops ( const QgsGradientStopsList stops)
inline

Definition at line 92 of file qgsvectorcolorrampv2.h.

const QgsGradientStopsList& QgsVectorGradientColorRampV2::stops ( ) const
inline

Definition at line 93 of file qgsvectorcolorrampv2.h.

virtual QString QgsVectorGradientColorRampV2::type ( ) const
inlineoverridevirtual

Implements QgsVectorColorRampV2.

Reimplemented in QgsCptCityColorRampV2.

Definition at line 77 of file qgsvectorcolorrampv2.h.

double QgsVectorGradientColorRampV2::value ( int  index) const
overridevirtual

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

Implements QgsVectorColorRampV2.

Definition at line 97 of file qgsvectorcolorrampv2.cpp.

Member Data Documentation

QColor QgsVectorGradientColorRampV2::mColor1
protected

Definition at line 103 of file qgsvectorcolorrampv2.h.

QColor QgsVectorGradientColorRampV2::mColor2
protected

Definition at line 103 of file qgsvectorcolorrampv2.h.

bool QgsVectorGradientColorRampV2::mDiscrete
protected

Definition at line 104 of file qgsvectorcolorrampv2.h.

QgsStringMap QgsVectorGradientColorRampV2::mInfo
protected

Definition at line 106 of file qgsvectorcolorrampv2.h.

QgsGradientStopsList QgsVectorGradientColorRampV2::mStops
protected

Definition at line 105 of file qgsvectorcolorrampv2.h.


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