QGIS API Documentation  2.5.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
qgsrasterrendererwidget.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsrasterrendererwidget.h
3  ---------------------------
4  begin : February 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 QGSRASTERRENDERERWIDGET_H
19 #define QGSRASTERRENDERERWIDGET_H
20 
21 #include "qgsrectangle.h"
22 
23 #include <QWidget>
24 
25 class QgsRasterLayer;
26 class QgsRasterRenderer;
27 
28 class GUI_EXPORT QgsRasterRendererWidget: public QWidget
29 {
30  public:
32  mRasterLayer( layer )
33  , mExtent( extent )
34  {
35  }
37 
39  {
43  CumulativeCut // 2 - 98% cumulative cut
44  };
45 
46  virtual QgsRasterRenderer* renderer() = 0;
47 
48  void setRasterLayer( QgsRasterLayer* layer ) { mRasterLayer = layer; }
49  const QgsRasterLayer* rasterLayer() const { return mRasterLayer; }
50 
51  virtual QString min( int index = 0 ) { Q_UNUSED( index ); return QString(); }
52  virtual QString max( int index = 0 ) { Q_UNUSED( index ); return QString(); }
53  virtual void setMin( QString value, int index = 0 ) { Q_UNUSED( index ); Q_UNUSED( value ); }
54  virtual void setMax( QString value, int index = 0 ) { Q_UNUSED( index ); Q_UNUSED( value ); }
55  virtual QString stdDev() { return QString(); }
56  virtual void setStdDev( QString value ) { Q_UNUSED( value ); }
57  virtual int selectedBand( int index = 0 ) { Q_UNUSED( index ); return -1; }
58 
59  protected:
62  QString displayBandName( int band ) const;
63 
66 };
67 
68 #endif // QGSRASTERRENDERERWIDGET_H
static unsigned index
Definition: mersenne-twister.cpp:36
A rectangle specified with double values.
Definition: qgsrectangle.h:35
Definition: qgsrasterrendererwidget.h:40
This class provides qgis with the ability to render raster datasets onto the mapcanvas.
Definition: qgsrasterlayer.h:169
QgsRasterRendererWidget(QgsRasterLayer *layer, const QgsRectangle &extent)
Definition: qgsrasterrendererwidget.h:31
QgsRasterLayer * mRasterLayer
Definition: qgsrasterrendererwidget.h:60
virtual ~QgsRasterRendererWidget()
Definition: qgsrasterrendererwidget.h:36
virtual void setStdDev(QString value)
Definition: qgsrasterrendererwidget.h:56
virtual QString min(int index=0)
Definition: qgsrasterrendererwidget.h:51
virtual int selectedBand(int index=0)
Definition: qgsrasterrendererwidget.h:57
QgsRectangle mExtent
Current extent.
Definition: qgsrasterrendererwidget.h:65
LoadMinMaxAlgo
Definition: qgsrasterrendererwidget.h:38
Definition: qgsrasterrendererwidget.h:28
void setRasterLayer(QgsRasterLayer *layer)
Definition: qgsrasterrendererwidget.h:48
virtual void setMin(QString value, int index=0)
Definition: qgsrasterrendererwidget.h:53
virtual QString max(int index=0)
Definition: qgsrasterrendererwidget.h:52
Definition: qgsrasterrendererwidget.h:41
virtual QString stdDev()
Definition: qgsrasterrendererwidget.h:55
Raster renderer pipe that applies colors to a raster.
Definition: qgsrasterrenderer.h:34
Definition: qgsrasterrendererwidget.h:42
const QgsRasterLayer * rasterLayer() const
Definition: qgsrasterrendererwidget.h:49
virtual void setMax(QString value, int index=0)
Definition: qgsrasterrendererwidget.h:54