|
Quantum GIS API Documentation
master-ce49b66
|
00001 /*************************************************************************** 00002 qgsrasterrendererwidget.h 00003 --------------------------- 00004 begin : February 2012 00005 copyright : (C) 2012 by Marco Hugentobler 00006 email : marco at sourcepole dot ch 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #ifndef QGSRASTERRENDERERWIDGET_H 00019 #define QGSRASTERRENDERERWIDGET_H 00020 00021 #include "qgsrectangle.h" 00022 00023 #include <QWidget> 00024 00025 class QgsRasterLayer; 00026 class QgsRasterRenderer; 00027 00028 class GUI_EXPORT QgsRasterRendererWidget: public QWidget 00029 { 00030 public: 00031 QgsRasterRendererWidget( QgsRasterLayer* layer, const QgsRectangle &extent ): 00032 mRasterLayer( layer ) 00033 , mExtent( extent ) 00034 { 00035 } 00036 virtual ~QgsRasterRendererWidget() {} 00037 00038 enum LoadMinMaxAlgo 00039 { 00040 Estimate, 00041 Actual, 00042 CurrentExtent, 00043 CumulativeCut // 2 - 98% cumulative cut 00044 }; 00045 00046 virtual QgsRasterRenderer* renderer() = 0; 00047 00048 void setRasterLayer( QgsRasterLayer* layer ) { mRasterLayer = layer; } 00049 const QgsRasterLayer* rasterLayer() const { return mRasterLayer; } 00050 00051 virtual QString min( int index = 0 ) { Q_UNUSED( index ); return QString( ); } 00052 virtual QString max( int index = 0 ) { Q_UNUSED( index ); return QString( ); } 00053 virtual void setMin( QString value, int index = 0 ) { Q_UNUSED( index ); Q_UNUSED( value ); } 00054 virtual void setMax( QString value, int index = 0 ) { Q_UNUSED( index ); Q_UNUSED( value ); } 00055 virtual QString stdDev( ) { return QString( ); } 00056 virtual void setStdDev( QString value ) { Q_UNUSED( value ); } 00057 virtual int selectedBand( int index = 0 ) { Q_UNUSED( index ); return -1; } 00058 00059 protected: 00060 QgsRasterLayer* mRasterLayer; 00062 QString displayBandName( int band ) const; 00063 00065 QgsRectangle mExtent; 00066 }; 00067 00068 #endif // QGSRASTERRENDERERWIDGET_H