QGIS API Documentation  master-6227475
src/core/raster/qgsrastershaderfunction.h
Go to the documentation of this file.
00001 /* **************************************************************************
00002                 qgsrastershaderfunction.h -  description
00003                        -------------------
00004 begin                : Fri Dec 28 2007
00005 copyright            : (C) 2007 by Peter J. Ersts
00006 email                : ersts@amnh.org
00007 
00008 ****************************************************************************/
00009 
00010 /* **************************************************************************
00011  *                                                                         *
00012  *   This program is free software; you can redistribute it and/or modify  *
00013  *   it under the terms of the GNU General Public License as published by  *
00014  *   the Free Software Foundation; either version 2 of the License, or     *
00015  *   (at your option) any later version.                                   *
00016  *                                                                         *
00017  ***************************************************************************/
00018 
00019 
00020 #ifndef QGSRASTERSHADERFUNCTION_H
00021 #define QGSRASTERSHADERFUNCTION_H
00022 
00027 #include <QColor>
00028 #include <QPair>
00029 
00030 class CORE_EXPORT QgsRasterShaderFunction
00031 {
00032 
00033   public:
00034     QgsRasterShaderFunction( double theMinimumValue = 0.0, double theMaximumValue = 255.0 );
00035     virtual ~QgsRasterShaderFunction() {}
00036 
00038     virtual void setMaximumValue( double );
00039 
00041     virtual void setMinimumValue( double );
00042 
00044     virtual bool shade( double, int*, int*, int*, int* );
00045 
00047     virtual bool shade( double, double, double, double, int*, int*, int*, int* );
00048 
00049     double minimumMaximumRange() const { return mMinimumMaximumRange; }
00050 
00051     double minimumValue() const { return mMinimumValue; }
00052     double maximumValue() const { return mMaximumValue; }
00053 
00054     virtual void legendSymbologyItems( QList< QPair< QString, QColor > >& symbolItems ) const { Q_UNUSED( symbolItems ); }
00055 
00056   protected:
00058     double mMaximumValue;
00059 
00061     double mMinimumValue;
00062 
00064     double mMinimumMaximumRange;
00065 };
00066 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines