QGIS API Documentation
2.2.0-Valmiera
|
#include <qgsvectorcolorrampv2.h>
Public Member Functions | |
QgsVectorGradientColorRampV2 (QColor color1=DEFAULT_GRADIENT_COLOR1, QColor color2=DEFAULT_GRADIENT_COLOR2, bool discrete=false, QgsGradientStopsList stops=QgsGradientStopsList()) | |
virtual int | count () const |
virtual double | value (int index) const |
virtual QColor | color (double value) const |
virtual QString | type () const |
virtual QgsVectorColorRampV2 * | clone () const |
virtual QgsStringMap | properties () const |
QColor | color1 () const |
QColor | color2 () const |
void | setColor1 (QColor color) |
void | setColor2 (QColor color) |
bool | isDiscrete () const |
void | setDiscrete (bool discrete) |
void | convertToDiscrete (bool discrete) |
void | setStops (const QgsGradientStopsList &stops) |
const QgsGradientStopsList & | stops () const |
QgsStringMap | info () const |
void | setInfo (const QgsStringMap &info) |
void | addStopsToGradient (QGradient *gradient) |
copy color ramp stops to a QGradient | |
Public Member Functions inherited from QgsVectorColorRampV2 | |
virtual | ~QgsVectorColorRampV2 () |
Static Public Member Functions | |
static QgsVectorColorRampV2 * | create (const QgsStringMap &properties=QgsStringMap()) |
Protected Attributes | |
QColor | mColor1 |
QColor | mColor2 |
bool | mDiscrete |
QgsGradientStopsList | mStops |
QgsStringMap | mInfo |
Definition at line 58 of file qgsvectorcolorrampv2.h.
QgsVectorGradientColorRampV2::QgsVectorGradientColorRampV2 | ( | QColor | color1 = DEFAULT_GRADIENT_COLOR1 , |
QColor | color2 = DEFAULT_GRADIENT_COLOR2 , |
||
bool | discrete = false , |
||
QgsGradientStopsList | stops = QgsGradientStopsList() |
||
) |
Definition at line 41 of file qgsvectorcolorrampv2.cpp.
Referenced by clone(), QgsCptCityColorRampV2::cloneGradientRamp(), and create().
void QgsVectorGradientColorRampV2::addStopsToGradient | ( | QGradient * | gradient | ) |
copy color ramp stops to a QGradient
Definition at line 222 of file qgsvectorcolorrampv2.cpp.
References mColor1, mColor2, and mStops.
Referenced by QgsGradientFillSymbolLayerV2::applyGradient().
|
virtual |
Implements QgsVectorColorRampV2.
Reimplemented in QgsCptCityColorRampV2.
Definition at line 147 of file qgsvectorcolorrampv2.cpp.
References mColor1, mColor2, mDiscrete, mInfo, mStops, QgsVectorGradientColorRampV2(), and setInfo().
|
virtual |
Implements QgsVectorColorRampV2.
Definition at line 110 of file qgsvectorcolorrampv2.cpp.
References _interpolate(), MathUtils::lower(), mColor1, mColor2, mDiscrete, and mStops.
|
inline |
Definition at line 80 of file qgsvectorcolorrampv2.h.
Referenced by QgsCptCityColorRampV2::copy(), and create().
|
inline |
Definition at line 81 of file qgsvectorcolorrampv2.h.
Referenced by QgsCptCityColorRampV2::copy(), and create().
void QgsVectorGradientColorRampV2::convertToDiscrete | ( | bool | discrete | ) |
Definition at line 180 of file qgsvectorcolorrampv2.cpp.
|
inlinevirtual |
Implements QgsVectorColorRampV2.
Definition at line 68 of file qgsvectorcolorrampv2.h.
Referenced by QgsCptCityColorRampItem::icon(), and QgsCptCityColorRampItem::init().
|
static |
Reimplemented in QgsCptCityColorRampV2.
Definition at line 47 of file qgsvectorcolorrampv2.cpp.
References color1(), color2(), QgsSymbolLayerV2Utils::decodeColor(), DEFAULT_GRADIENT_COLOR1, DEFAULT_GRADIENT_COLOR2, info(), QgsVectorGradientColorRampV2(), setInfo(), and stops().
Referenced by QgsSymbolLayerV2Utils::loadColorRamp().
|
inline |
Definition at line 92 of file qgsvectorcolorrampv2.h.
Referenced by QgsCptCityColorRampV2::cloneGradientRamp(), and create().
|
inline |
Definition at line 85 of file qgsvectorcolorrampv2.h.
Referenced by QgsCptCityColorRampV2::copy(), and QgsCptCityColorRampItem::init().
|
virtual |
Implements QgsVectorColorRampV2.
Reimplemented in QgsCptCityColorRampV2.
Definition at line 155 of file qgsvectorcolorrampv2.cpp.
References QgsSymbolLayerV2Utils::encodeColor(), mColor1, mColor2, mDiscrete, mInfo, and mStops.
|
inline |
Definition at line 82 of file qgsvectorcolorrampv2.h.
References QgsVectorColorRampV2::color().
|
inline |
Definition at line 83 of file qgsvectorcolorrampv2.h.
References QgsVectorColorRampV2::color().
|
inline |
Definition at line 86 of file qgsvectorcolorrampv2.h.
|
inline |
Definition at line 93 of file qgsvectorcolorrampv2.h.
Referenced by clone(), QgsCptCityColorRampV2::cloneGradientRamp(), and create().
|
inline |
Definition at line 89 of file qgsvectorcolorrampv2.h.
|
inline |
Definition at line 90 of file qgsvectorcolorrampv2.h.
Referenced by QgsCptCityColorRampV2::copy(), and create().
|
inlinevirtual |
Implements QgsVectorColorRampV2.
Reimplemented in QgsCptCityColorRampV2.
Definition at line 74 of file qgsvectorcolorrampv2.h.
|
virtual |
Implements QgsVectorColorRampV2.
Definition at line 94 of file qgsvectorcolorrampv2.cpp.
References mStops.
|
protected |
Definition at line 100 of file qgsvectorcolorrampv2.h.
Referenced by addStopsToGradient(), clone(), QgsCptCityColorRampV2::cloneGradientRamp(), color(), QgsCptCityColorRampV2::copy(), QgsCptCityColorRampV2::loadFile(), and properties().
|
protected |
Definition at line 100 of file qgsvectorcolorrampv2.h.
Referenced by addStopsToGradient(), clone(), QgsCptCityColorRampV2::cloneGradientRamp(), color(), convertToDiscrete(), QgsCptCityColorRampV2::copy(), QgsCptCityColorRampV2::loadFile(), and properties().
|
protected |
Definition at line 101 of file qgsvectorcolorrampv2.h.
Referenced by clone(), QgsCptCityColorRampV2::cloneGradientRamp(), color(), convertToDiscrete(), QgsCptCityColorRampV2::copy(), QgsCptCityColorRampV2::loadFile(), and properties().
|
protected |
Definition at line 103 of file qgsvectorcolorrampv2.h.
Referenced by clone(), and properties().
|
protected |
Definition at line 102 of file qgsvectorcolorrampv2.h.
Referenced by addStopsToGradient(), clone(), QgsCptCityColorRampV2::cloneGradientRamp(), color(), convertToDiscrete(), QgsCptCityColorRampV2::copy(), QgsCptCityColorRampV2::loadFile(), properties(), and value().