2
/**Renderer class which interpolates rgb values linear between the minimum and maximum value of the classification field*/
3
class QgsContinuousColorRenderer : QgsRenderer
6
#include <qgscontinuouscolorrenderer.h>
10
QgsContinuousColorRenderer(QGis::GeometryType type);
11
QgsContinuousColorRenderer(const QgsContinuousColorRenderer& other);
12
virtual ~QgsContinuousColorRenderer();
13
/**Renders the feature using the minimum and maximum value of the classification field
15
void renderFeature(QgsRenderContext &renderContext, QgsFeature& f, QImage* img, bool selected, double opacity = 1.0 );
16
/**Returns the number of the classification field*/
17
int classificationField() const;
18
/**Sets the id of the classification field*/
19
void setClassificationField(int id);
20
/**Sets the symbol for the minimum value. The symbol has to be created using the new operator and is automatically deleted when inserting a new symbol or when the instance is destroyed*/
21
void setMinimumSymbol(QgsSymbol* sy /Transfer/);
22
/**Sets the symbol for the maximum value. The symbol has to be created using the new operator and is automatically deleted when inserting a new symbol or when the instance is destroyed*/
23
void setMaximumSymbol(QgsSymbol* sy /Transfer/);
24
/** Sets whether to draw the polygon outline*/
25
void setDrawPolygonOutline(bool draw);
26
/**Returns the symbol for the minimum value*/
27
const QgsSymbol* minimumSymbol() const;
28
/**Returns the symbol for the maximum value*/
29
const QgsSymbol* maximumSymbol() const;
30
/** whether to draw a polygon outline*/
31
bool drawPolygonOutline() const;
32
/**Reads the renderer configuration from an XML file
33
@param rnode the Dom node to read
34
@param vl the vector layer which will be associated with the renderer*/
35
virtual int readXML(const QDomNode& rnode, QgsVectorLayer& vl);
36
/**Writes the contents of the renderer to a configuration file
37
@ return true in case of success*/
38
virtual bool writeXML( QDomNode & layer_node, QDomDocument & document, const QgsVectorLayer& vl ) const;
40
bool needsAttributes() const;
41
/**Returns a list with the index of the classification attribute*/
42
QList<int> classificationAttributes() const;
43
/**Returns the renderers name*/
45
/**Return symbology items*/
46
const QList<QgsSymbol*> symbols() const;
47
QgsRenderer* clone() const /Factory/;