34 sipType = sipType_QgsGradientColorRamp;
36 sipType = sipType_QgsLimitedRandomColorRamp;
38 sipType = sipType_QgsRandomColorRamp;
40 sipType = sipType_QgsPresetSchemeColorRamp;
42 sipType = sipType_QgsColorBrewerColorRamp;
44 sipType = sipType_QgsCptCityColorRamp;
61 virtual double value(
int index )
const = 0;
68 virtual QColor
color(
double value )
const = 0;
73 virtual QString
type()
const = 0;
100 static QList< QPair< QString, QString > > rampTypes();
static QString typeString()
Returns the string identifier for QgsColorBrewerColorRamp.
Abstract base class for color ramps.
virtual QColor color(double value) const =0
Returns the color corresponding to a specified value.
virtual int count() const =0
Returns number of defined colors, or -1 if undefined.
virtual double value(int index) const =0
Returns relative value between [0,1] of color at specified index.
virtual QVariantMap properties() const =0
Returns a string map containing all the color ramp's properties.
virtual QgsColorRamp * clone() const =0
Creates a clone of the color ramp.
virtual QString type() const =0
Returns a string representing the color ramp type.
virtual void invert()
Inverts the ordering of the color ramp.
static QString typeString()
Returns the string identifier for QgsCptCityColorRamp.
static QString typeString()
Returns the string identifier for QgsGradientColorRamp.
static QString typeString()
Returns the string identifier for QgsLimitedRandomColorRamp.
static QString typeString()
Returns the string identifier for QgsPresetSchemeColorRamp.
static QString typeString()
Returns the string identifier for QgsRandomColorRamp.
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)