~ubuntu-branches/ubuntu/wily/qgis/wily

« back to all changes in this revision

Viewing changes to python/core/qgscontinuouscolorrenderer.sip

  • Committer: Bazaar Package Importer
  • Author(s): Johan Van de Wauw
  • Date: 2010-07-11 20:23:24 UTC
  • mfrom: (3.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100711202324-5ktghxa7hracohmr
Tags: 1.4.0+12730-3ubuntu1
* Merge from Debian unstable (LP: #540941).
* Fix compilation issues with QT 4.7
* Add build-depends on libqt4-webkit-dev 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
/**Renderer class which interpolates rgb values linear between the minimum and maximum value of the classification field*/
 
3
class QgsContinuousColorRenderer : QgsRenderer
 
4
{
 
5
%TypeHeaderCode
 
6
#include <qgscontinuouscolorrenderer.h>
 
7
%End
 
8
 
 
9
 public:
 
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
 
14
      * added in 1.2 */
 
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;
 
39
    /** Returns true*/
 
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*/
 
44
    QString name() const;
 
45
    /**Return symbology items*/
 
46
    const QList<QgsSymbol*> symbols() const;
 
47
    QgsRenderer* clone() const /Factory/;
 
48
};
 
49