QGIS API Documentation
2.0.1-Dufour
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
src
core
raster
qgssinglebandpseudocolorrenderer.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgssinglebandpseudocolorrenderer.h
3
----------------------------------
4
begin : January 2012
5
copyright : (C) 2012 by Marco Hugentobler
6
email : marco at sourcepole dot 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
18
#ifndef QGSSINGLEBANDPSEUDOCOLORRENDERER_H
19
#define QGSSINGLEBANDPSEUDOCOLORRENDERER_H
20
21
#include "
qgsrasterrenderer.h
"
22
23
class
QDomElement;
24
class
QgsRasterShader
;
25
29
class
CORE_EXPORT
QgsSingleBandPseudoColorRenderer
:
public
QgsRasterRenderer
30
{
31
public
:
33
QgsSingleBandPseudoColorRenderer
(
QgsRasterInterface
* input,
int
band,
QgsRasterShader
* shader );
34
~
QgsSingleBandPseudoColorRenderer
();
35
QgsRasterInterface
*
clone
()
const
;
36
37
static
QgsRasterRenderer
* create(
const
QDomElement& elem,
QgsRasterInterface
* input );
38
39
QgsRasterBlock
*
block
(
int
bandNo,
const
QgsRectangle
& extent,
int
width,
int
height );
40
42
void
setShader(
QgsRasterShader
* shader );
43
QgsRasterShader
*
shader
() {
return
mShader; }
44
const
QgsRasterShader
*
shader
()
const
{
return
mShader; }
45
46
void
writeXML
( QDomDocument& doc, QDomElement& parentElem )
const
;
47
48
void
legendSymbologyItems
( QList< QPair< QString, QColor > >& symbolItems )
const
;
49
50
QList<int>
usesBands
()
const
;
51
52
double
classificationMin
()
const
{
return
mClassificationMin; }
53
double
classificationMax
()
const
{
return
mClassificationMax; }
54
void
setClassificationMin
(
double
min
) { mClassificationMin =
min
; }
55
void
setClassificationMax
(
double
max
) { mClassificationMax =
max
; }
56
int
classificationMinMaxOrigin
()
const
{
return
mClassificationMinMaxOrigin; }
57
void
setClassificationMinMaxOrigin
(
int
origin ) { mClassificationMinMaxOrigin = origin; }
58
59
private
:
60
QgsRasterShader
*
mShader
;
61
int
mBand
;
62
63
// Minimum and maximum values used for automatic classification, these
64
// values are not used by renderer in rendering process
65
double
mClassificationMin
;
66
double
mClassificationMax
;
67
68
int
mClassificationMinMaxOrigin
;
69
};
70
71
#endif // QGSSINGLEBANDPSEUDOCOLORRENDERER_H
Generated on Tue Sep 24 2013 14:41:48 for QGIS API Documentation by
1.8.1.2