QGIS API Documentation  2.8.2-Wien
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
qgsrastershaderfunction.h
Go to the documentation of this file.
1 /* **************************************************************************
2  qgsrastershaderfunction.h - description
3  -------------------
4 begin : Fri Dec 28 2007
5 copyright : (C) 2007 by Peter J. Ersts
6 email : [email protected]
7 
8 ****************************************************************************/
9 
10 /* **************************************************************************
11  * *
12  * This program is free software; you can redistribute it and/or modify *
13  * it under the terms of the GNU General Public License as published by *
14  * the Free Software Foundation; either version 2 of the License, or *
15  * (at your option) any later version. *
16  * *
17  ***************************************************************************/
18 
19 
20 #ifndef QGSRASTERSHADERFUNCTION_H
21 #define QGSRASTERSHADERFUNCTION_H
22 
27 #include <QColor>
28 #include <QPair>
29 
30 class CORE_EXPORT QgsRasterShaderFunction
31 {
32 
33  public:
34  QgsRasterShaderFunction( double theMinimumValue = 0.0, double theMaximumValue = 255.0 );
36 
38  virtual void setMaximumValue( double );
39 
41  virtual void setMinimumValue( double );
42 
44  virtual bool shade( double, int*, int*, int*, int* );
45 
47  virtual bool shade( double, double, double, double, int*, int*, int*, int* );
48 
49  double minimumMaximumRange() const { return mMinimumMaximumRange; }
50 
51  double minimumValue() const { return mMinimumValue; }
52  double maximumValue() const { return mMaximumValue; }
53 
54  virtual void legendSymbologyItems( QList< QPair< QString, QColor > >& symbolItems ) const { Q_UNUSED( symbolItems ); }
55 
56  protected:
58  double mMaximumValue;
59 
61  double mMinimumValue;
62 
65 };
66 #endif