QGIS API Documentation
2.18.21-Las Palmas (9fba24a)
|
Random color ramp, which returns random colors based on preset parameters. More...
#include <qgsvectorcolorrampv2.h>
Public Member Functions | |
QgsVectorRandomColorRampV2 (int count=DEFAULT_RANDOM_COUNT, int hueMin=DEFAULT_RANDOM_HUE_MIN, int hueMax=DEFAULT_RANDOM_HUE_MAX, int satMin=DEFAULT_RANDOM_SAT_MIN, int satMax=DEFAULT_RANDOM_SAT_MAX, int valMin=DEFAULT_RANDOM_VAL_MIN, int valMax=DEFAULT_RANDOM_VAL_MAX) | |
virtual QgsVectorRandomColorRampV2 * | clone () 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 | count () const override |
Returns number of defined colors, or -1 if undefined. More... | |
int | hueMax () const |
int | hueMin () const |
virtual QgsStringMap | properties () const override |
Returns a string map containing all the color ramp's properties. More... | |
int | satMax () const |
int | satMin () const |
void | setCount (int val) |
void | setHueMax (int val) |
void | setHueMin (int val) |
void | setSatMax (int val) |
void | setSatMin (int val) |
void | setValMax (int val) |
void | setValMin (int val) |
virtual QString | type () const override |
Returns a string representing the color ramp type. More... | |
void | updateColors () |
int | valMax () const |
int | valMin () const |
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 QgsVectorColorRampV2 * | create (const QgsStringMap &properties=QgsStringMap()) |
static QList< QColor > | randomColors (int count, int hueMax=DEFAULT_RANDOM_HUE_MAX, int hueMin=DEFAULT_RANDOM_HUE_MIN, int satMax=DEFAULT_RANDOM_SAT_MAX, int satMin=DEFAULT_RANDOM_SAT_MIN, int valMax=DEFAULT_RANDOM_VAL_MAX, int valMin=DEFAULT_RANDOM_VAL_MIN) |
Get a list of random colors. More... | |
Protected Attributes | |
QList< QColor > | mColors |
int | mCount |
int | mHueMax |
int | mHueMin |
int | mSatMax |
int | mSatMin |
int | mValMax |
int | mValMin |
Random color ramp, which returns random colors based on preset parameters.
Definition at line 230 of file qgsvectorcolorrampv2.h.
QgsVectorRandomColorRampV2::QgsVectorRandomColorRampV2 | ( | int | count = DEFAULT_RANDOM_COUNT , |
int | hueMin = DEFAULT_RANDOM_HUE_MIN , |
||
int | hueMax = DEFAULT_RANDOM_HUE_MAX , |
||
int | satMin = DEFAULT_RANDOM_SAT_MIN , |
||
int | satMax = DEFAULT_RANDOM_SAT_MAX , |
||
int | valMin = DEFAULT_RANDOM_VAL_MIN , |
||
int | valMax = DEFAULT_RANDOM_VAL_MAX |
||
) |
Definition at line 280 of file qgsvectorcolorrampv2.cpp.
|
overridevirtual |
Creates a clone of the color ramp.
Implements QgsVectorColorRampV2.
Definition at line 328 of file qgsvectorcolorrampv2.cpp.
|
overridevirtual |
Returns the color corresponding to a specified value.
value | value between [0, 1] inclusive |
Implements QgsVectorColorRampV2.
Definition at line 314 of file qgsvectorcolorrampv2.cpp.
|
inlineoverridevirtual |
Returns number of defined colors, or -1 if undefined.
Implements QgsVectorColorRampV2.
Definition at line 260 of file qgsvectorcolorrampv2.h.
|
static |
Definition at line 290 of file qgsvectorcolorrampv2.cpp.
|
inline |
Definition at line 262 of file qgsvectorcolorrampv2.h.
|
inline |
Definition at line 261 of file qgsvectorcolorrampv2.h.
|
overridevirtual |
Returns a string map containing all the color ramp's properties.
Implements QgsVectorColorRampV2.
Definition at line 333 of file qgsvectorcolorrampv2.cpp.
|
static |
Get a list of random colors.
Definition at line 346 of file qgsvectorcolorrampv2.cpp.
|
inline |
Definition at line 264 of file qgsvectorcolorrampv2.h.
|
inline |
Definition at line 263 of file qgsvectorcolorrampv2.h.
|
inline |
Definition at line 268 of file qgsvectorcolorrampv2.h.
|
inline |
Definition at line 270 of file qgsvectorcolorrampv2.h.
|
inline |
Definition at line 269 of file qgsvectorcolorrampv2.h.
|
inline |
Definition at line 272 of file qgsvectorcolorrampv2.h.
|
inline |
Definition at line 271 of file qgsvectorcolorrampv2.h.
|
inline |
Definition at line 274 of file qgsvectorcolorrampv2.h.
|
inline |
Definition at line 273 of file qgsvectorcolorrampv2.h.
|
inlineoverridevirtual |
Returns a string representing the color ramp type.
Implements QgsVectorColorRampV2.
Definition at line 244 of file qgsvectorcolorrampv2.h.
void QgsVectorRandomColorRampV2::updateColors | ( | ) |
Definition at line 379 of file qgsvectorcolorrampv2.cpp.
|
inline |
Definition at line 266 of file qgsvectorcolorrampv2.h.
|
inline |
Definition at line 265 of file qgsvectorcolorrampv2.h.
|
overridevirtual |
Returns relative value between [0,1] of color at specified index.
Implements QgsVectorColorRampV2.
Definition at line 308 of file qgsvectorcolorrampv2.cpp.
Definition at line 279 of file qgsvectorcolorrampv2.h.
|
protected |
Definition at line 277 of file qgsvectorcolorrampv2.h.
|
protected |
Definition at line 278 of file qgsvectorcolorrampv2.h.
|
protected |
Definition at line 278 of file qgsvectorcolorrampv2.h.
|
protected |
Definition at line 278 of file qgsvectorcolorrampv2.h.
|
protected |
Definition at line 278 of file qgsvectorcolorrampv2.h.
|
protected |
Definition at line 278 of file qgsvectorcolorrampv2.h.
|
protected |
Definition at line 278 of file qgsvectorcolorrampv2.h.