Constrained random color ramp, which returns random colors based on preset parameters.
More...
#include <qgscolorrampimpl.h>
|
| | QgsLimitedRandomColorRamp (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) |
| | Constructor for QgsLimitedRandomColorRamp.
|
| QgsLimitedRandomColorRamp * | clone () const override |
| | Creates a clone of the color ramp.
|
| QColor | color (double value) const override |
| | Returns the color corresponding to a specified value.
|
| int | count () const override |
| | Returns number of defined colors, or -1 if undefined.
|
| int | hueMax () const |
| | Returns the maximum hue for generated colors.
|
| int | hueMin () const |
| | Returns the minimum hue for generated colors.
|
| QVariantMap | properties () const override |
| | Returns a string map containing all the color ramp's properties.
|
| int | satMax () const |
| | Returns the maximum saturation for generated colors.
|
| int | satMin () const |
| | Returns the minimum saturation for generated colors.
|
| void | setCount (int val) |
| | Sets the number of colors contained in the ramp.
|
| void | setHueMax (int val) |
| | Sets the maximum hue for generated colors.
|
| void | setHueMin (int val) |
| | Sets the minimum hue for generated colors.
|
| void | setSatMax (int val) |
| | Sets the maximum saturation for generated colors.
|
| void | setSatMin (int val) |
| | Sets the minimum saturation for generated colors.
|
| void | setValMax (int val) |
| | Sets the maximum value for generated colors.
|
| void | setValMin (int val) |
| | Sets the minimum value for generated colors.
|
| QString | type () const override |
| | Returns a string representing the color ramp type.
|
| void | updateColors () |
| | Must be called after changing the properties of the color ramp to regenerate the list of random colors.
|
| int | valMax () const |
| | Returns the maximum value for generated colors.
|
| int | valMin () const |
| | Returns the minimum value for generated colors.
|
| double | value (int index) const override |
| | Returns relative value between [0,1] of color at specified index.
|
| virtual | ~QgsColorRamp () |
| virtual void | invert () |
| | Inverts the ordering of the color ramp.
|
Constrained random color ramp, which returns random colors based on preset parameters.
Definition at line 328 of file qgscolorrampimpl.h.
◆ QgsLimitedRandomColorRamp()
Constructor for QgsLimitedRandomColorRamp.
- Parameters
-
| count | number of colors in ramp |
| hueMin | minimum hue |
| hueMax | maximum hue |
| satMin | minimum saturation |
| satMax | maximum saturation |
| valMin | minimum color value |
| valMax | maximum color value |
Definition at line 650 of file qgscolorrampimpl.cpp.
◆ clone()
◆ color()
| QColor QgsLimitedRandomColorRamp::color |
( |
double | value | ) |
const |
|
overridevirtual |
Returns the color corresponding to a specified value.
- Parameters
-
| value | value between [0, 1] inclusive |
- Returns
- color for value
Implements QgsColorRamp.
Definition at line 694 of file qgscolorrampimpl.cpp.
◆ count()
| int QgsLimitedRandomColorRamp::count |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ create()
| QgsColorRamp * QgsLimitedRandomColorRamp::create |
( |
const QVariantMap & | properties = QVariantMap() | ) |
|
|
static |
◆ hueMax()
| int QgsLimitedRandomColorRamp::hueMax |
( |
| ) |
const |
|
inline |
◆ hueMin()
| int QgsLimitedRandomColorRamp::hueMin |
( |
| ) |
const |
|
inline |
◆ properties()
| QVariantMap QgsLimitedRandomColorRamp::properties |
( |
| ) |
const |
|
overridevirtual |
◆ randomColors()
◆ satMax()
| int QgsLimitedRandomColorRamp::satMax |
( |
| ) |
const |
|
inline |
◆ satMin()
| int QgsLimitedRandomColorRamp::satMin |
( |
| ) |
const |
|
inline |
◆ setCount()
| void QgsLimitedRandomColorRamp::setCount |
( |
int | val | ) |
|
|
inline |
◆ setHueMax()
| void QgsLimitedRandomColorRamp::setHueMax |
( |
int | val | ) |
|
|
inline |
◆ setHueMin()
| void QgsLimitedRandomColorRamp::setHueMin |
( |
int | val | ) |
|
|
inline |
◆ setSatMax()
| void QgsLimitedRandomColorRamp::setSatMax |
( |
int | val | ) |
|
|
inline |
◆ setSatMin()
| void QgsLimitedRandomColorRamp::setSatMin |
( |
int | val | ) |
|
|
inline |
◆ setValMax()
| void QgsLimitedRandomColorRamp::setValMax |
( |
int | val | ) |
|
|
inline |
◆ setValMin()
| void QgsLimitedRandomColorRamp::setValMin |
( |
int | val | ) |
|
|
inline |
◆ type()
| QString QgsLimitedRandomColorRamp::type |
( |
| ) |
const |
|
overridevirtual |
◆ typeString()
| QString QgsLimitedRandomColorRamp::typeString |
( |
| ) |
|
|
inlinestatic |
◆ updateColors()
| void QgsLimitedRandomColorRamp::updateColors |
( |
| ) |
|
Must be called after changing the properties of the color ramp to regenerate the list of random colors.
Definition at line 764 of file qgscolorrampimpl.cpp.
◆ valMax()
| int QgsLimitedRandomColorRamp::valMax |
( |
| ) |
const |
|
inline |
◆ valMin()
| int QgsLimitedRandomColorRamp::valMin |
( |
| ) |
const |
|
inline |
◆ value()
| double QgsLimitedRandomColorRamp::value |
( |
int | index | ) |
const |
|
overridevirtual |
◆ mColors
| QList<QColor> QgsLimitedRandomColorRamp::mColors |
|
protected |
◆ mCount
| int QgsLimitedRandomColorRamp::mCount |
|
protected |
◆ mHueMax
| int QgsLimitedRandomColorRamp::mHueMax |
|
protected |
◆ mHueMin
| int QgsLimitedRandomColorRamp::mHueMin |
|
protected |
◆ mSatMax
| int QgsLimitedRandomColorRamp::mSatMax |
|
protected |
◆ mSatMin
| int QgsLimitedRandomColorRamp::mSatMin |
|
protected |
◆ mValMax
| int QgsLimitedRandomColorRamp::mValMax |
|
protected |
◆ mValMin
| int QgsLimitedRandomColorRamp::mValMin |
|
protected |
The documentation for this class was generated from the following files: