Quantum GIS API Documentation
1.7.5-Wroclaw
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
src
core
renderer
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
:
34
QgsContinuousColorRenderer
(
QGis::GeometryType
type );
35
QgsContinuousColorRenderer
(
const
QgsContinuousColorRenderer
& other );
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
;
71
QgsAttributeList
classificationAttributes
()
const
;
73
QString
name
()
const
;
75
const
QList<QgsSymbol*>
symbols
()
const
;
76
QgsRenderer
*
clone
()
const
;
77
protected
:
79
int
mClassificationField
;
81
QgsSymbol
*
mMinimumSymbol
;
83
QgsSymbol
*
mMaximumSymbol
;
85
bool
mDrawPolygonOutline
;
86
};
87
88
inline
int
QgsContinuousColorRenderer::classificationField
()
const
89
{
90
return
mClassificationField
;
91
}
92
93
inline
void
QgsContinuousColorRenderer::setClassificationField
(
int
id
)
94
{
95
mClassificationField
= id;
96
}
97
98
inline
const
QgsSymbol
*
QgsContinuousColorRenderer::minimumSymbol
()
const
99
{
100
return
mMinimumSymbol
;
101
}
102
103
inline
const
QgsSymbol
*
QgsContinuousColorRenderer::maximumSymbol
()
const
104
{
105
return
mMaximumSymbol
;
106
}
107
108
inline
bool
QgsContinuousColorRenderer::needsAttributes
()
const
109
{
110
return
true
;
111
}
112
113
114
#endif
Generated on Wed Jun 13 2012 13:54:11 for Quantum GIS API Documentation by
1.8.1