QGIS API Documentation
2.18.21-Las Palmas (9fba24a)
|
#include <qgsvectorcolorrampv2.h>
Public Member Functions | |
QgsRandomColorsV2 () | |
~QgsRandomColorsV2 () | |
QgsRandomColorsV2 * | clone () const override |
Creates a clone of the color ramp. More... | |
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... | |
QgsStringMap | properties () const override |
Returns a string map containing all the color ramp's properties. More... | |
virtual void | setTotalColorCount (const int colorCount) |
Sets the desired total number of unique colors for the resultant ramp. More... | |
QString | type () const override |
Returns a string representing the color ramp type. More... | |
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 () |
Protected Attributes | |
QList< QColor > | mPrecalculatedColors |
int | mTotalColorCount |
Definition at line 285 of file qgsvectorcolorrampv2.h.
QgsRandomColorsV2::QgsRandomColorsV2 | ( | ) |
Definition at line 386 of file qgsvectorcolorrampv2.cpp.
QgsRandomColorsV2::~QgsRandomColorsV2 | ( | ) |
Definition at line 391 of file qgsvectorcolorrampv2.cpp.
|
overridevirtual |
Creates a clone of the color ramp.
Implements QgsVectorColorRampV2.
Definition at line 464 of file qgsvectorcolorrampv2.cpp.
|
overridevirtual |
Returns the color corresponding to a specified value.
value | value between [0, 1] inclusive |
Implements QgsVectorColorRampV2.
Definition at line 407 of file qgsvectorcolorrampv2.cpp.
|
overridevirtual |
Returns number of defined colors, or -1 if undefined.
Implements QgsVectorColorRampV2.
Definition at line 396 of file qgsvectorcolorrampv2.cpp.
|
overridevirtual |
Returns a string map containing all the color ramp's properties.
Implements QgsVectorColorRampV2.
Definition at line 469 of file qgsvectorcolorrampv2.cpp.
|
virtual |
Sets the desired total number of unique colors for the resultant ramp.
Calling this method pregenerates a set of visually distinct colors which are returned by subsequent calls to color().
colorCount | number of unique colors |
Definition at line 427 of file qgsvectorcolorrampv2.cpp.
|
overridevirtual |
Returns a string representing the color ramp type.
Implements QgsVectorColorRampV2.
Definition at line 459 of file qgsvectorcolorrampv2.cpp.
|
overridevirtual |
Returns relative value between [0,1] of color at specified index.
Implements QgsVectorColorRampV2.
Definition at line 401 of file qgsvectorcolorrampv2.cpp.
Definition at line 314 of file qgsvectorcolorrampv2.h.
|
protected |
Definition at line 313 of file qgsvectorcolorrampv2.h.