QGIS API Documentation  2.8.2-Wien
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
qgsrasterminmaxwidget.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsrasterminmaxwidget.h
3  ---------------------------------
4  begin : July 2012
5  copyright : (C) 2012 by Radim Blazek
6  email : radim dot blazek at gmail dot com
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 QGSRASTERMINMAXWIDGET_H
19 #define QGSRASTERMINMAXWIDGET_H
20 
21 #include "ui_qgsrasterminmaxwidgetbase.h"
22 #include "qgsrasterlayer.h"
23 #include "qgsrectangle.h"
24 
25 class GUI_EXPORT QgsRasterMinMaxWidget: public QWidget, private Ui::QgsRasterMinMaxWidgetBase
26 {
27  Q_OBJECT
28  public:
29  QgsRasterMinMaxWidget( QgsRasterLayer* theLayer, QWidget *parent = 0 );
31 
32  void setExtent( const QgsRectangle & theExtent ) { mExtent = theExtent; }
33 
34  void setBands( const QList<int> & theBands ) { mBands = theBands; }
35 
36  // Load programmaticaly with current values
37  void load() { on_mLoadPushButton_clicked(); }
38 
39  signals:
40  void load( int theBandNo, double theMin, double theMax, int origin );
41 
42  private slots:
43  void on_mLoadPushButton_clicked();
44 
45  private:
46  QgsRasterLayer* mLayer;
47  QList<int> mBands;
48  QgsRectangle mExtent;
49 };
50 
51 #endif // QGSRASTERMINMAXWIDGET_H