Quantum GIS API Documentation  1.7.5-Wroclaw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
qgscontinuouscolorrenderer.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgscontinuouscolorrenderer.h - description
3  -------------------
4  begin : Nov 2003
5  copyright : (C) 2003 by Marco Hugentobler
6  email : mhugent@geo.unizh.ch
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 /* $Id: qgscontinuouscolorrenderer.h 5371 2006-04-25 01:52:13Z wonder $ */
18 #ifndef QGSCONTINUOUSCOLORRENDERER_H
19 #define QGSCONTINUOUSCOLORRENDERER_H
20 
21 #include "qgsrenderer.h"
22 #include "qgsmaptopixel.h"
23 #include "qgspoint.h"
24 #include "qgsfeature.h"
25 
26 class QgsSymbol;
27 class QPainter;
28 class QImage;
29 
31 class CORE_EXPORT QgsContinuousColorRenderer: public QgsRenderer
32 {
33  public:
36  QgsContinuousColorRenderer& operator=( const QgsContinuousColorRenderer& other );
37  virtual ~QgsContinuousColorRenderer();
38 
41  void renderFeature( QgsRenderContext &renderContext, QgsFeature& f, QImage* img, bool selected, double opacity = 1.0 );
42 
44  int classificationField() const;
46  void setClassificationField( int id );
48  void setMinimumSymbol( QgsSymbol* sy );
50  void setMaximumSymbol( QgsSymbol* sy );
52  void setDrawPolygonOutline( bool draw ) { mDrawPolygonOutline = draw;}
54  const QgsSymbol* minimumSymbol() const;
56  const QgsSymbol* maximumSymbol() const;
58  bool drawPolygonOutline() const { return mDrawPolygonOutline; }
64  virtual int readXML( const QDomNode& rnode, QgsVectorLayer& vl );
67  virtual bool writeXML( QDomNode & layer_node, QDomDocument & document, const QgsVectorLayer& vl ) const;
69  bool needsAttributes() const;
73  QString name() const;
75  const QList<QgsSymbol*> symbols() const;
76  QgsRenderer* clone() const;
77  protected:
86 };
87 
89 {
90  return mClassificationField;
91 }
92 
94 {
96 }
97 
99 {
100  return mMinimumSymbol;
101 }
102 
104 {
105  return mMaximumSymbol;
106 }
107 
109 {
110  return true;
111 }
112 
113 
114 #endif