RasterHistogramWidget.h
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 /*!
21  \file terralib/qt/widgets/rp/RasterHistogramWidget.h
22 
23  \brief This file has the RasterHistogramWidget class.
24 */
25 
26 #ifndef __TERRALIB_QT_WIDGETS_CANVAS_INTERNAL_RASTERHISTOGRAMWIDGET_H
27 #define __TERRALIB_QT_WIDGETS_CANVAS_INTERNAL_RASTERHISTOGRAMWIDGET_H
28 
29 // TerraLib
30 #include "../../../maptools/AbstractLayer.h"
31 #include "../Config.h"
32 
33 // STL
34 #include <memory>
35 
36 // Qt
37 #include <QWidget>
38 
39 //QWT
40 #include <qwt_plot_marker.h>
41 
42 namespace Ui { class RasterHistogramWidgetForm; }
43 
44 namespace te
45 {
46  namespace rst { class Raster; }
47 
48  namespace qt
49  {
50  namespace widgets
51  {
52  class ChartStyle;
53  class ChartDisplay;
54  class Histogram;
55  class HistogramChart;
56  /*!
57  \class RasterHistogramWidget
58 
59  \brief This class is used to define a component for viewing overlaid layers.
60  */
62  {
63  Q_OBJECT
64 
65  public:
66 
67  RasterHistogramWidget(QWidget* parent = 0, Qt::WindowFlags f = 0);
68 
70 
71  Ui::RasterHistogramWidgetForm* getForm() const;
72 
73  void setInputRaster(te::rst::Raster* raster);
74 
75  void setOutputRaster(te::rst::Raster* raster);
76 
77  void drawHistogram(int band);
78 
79  void setMinimumValueEnabled(bool enable);
80 
81  void updateMinimumValueLine(int value, bool replot = false);
82 
83  void updateMinimumValueLabel(QString value);
84 
85  void setMaximumValueEnabled(bool enable);
86 
87  void updateMaximumValueLine(int value, bool replot = false);
88 
89  void updateMaximumValueLabel(QString value);
90 
91 
92  protected slots:
93 
94  void onApplyToolButtonClicked();
95 
96  void onLeftPointSelected(const QPointF& point);
97 
98  void onRigthPointSelected(const QPointF& point);
99 
100  signals:
101 
102  void minValueSelected(int value, int band);
103 
104  void maxValueSelected(int value, int band);
105 
106 
107  private:
108 
109  std::auto_ptr<Ui::RasterHistogramWidgetForm> m_ui;
110 
111  std::auto_ptr<te::rst::Raster> m_inputRaster;
112  std::auto_ptr<te::rst::Raster> m_outputRaster;
113 
116 
119 
122 
123  QwtPlotMarker* m_minValueLine;
124  QwtPlotMarker* m_maxValueLine;
125  };
126 
127  } // end namespace widgets
128  } // end namespace qt
129 } // end namespace te
130 
131 #endif // __TERRALIB_QT_WIDGETS_CANVAS_INTERNAL_RASTERHISTOGRAMWIDGET_H
132 
te::qt::widgets::HistogramChart * m_histogramChartOutput
std::auto_ptr< te::rst::Raster > m_outputRaster
te::qt::widgets::ChartDisplay * m_chartDisplay
A class to represent a Histogram.
Definition: Histogram.h:56
te::qt::widgets::Histogram * m_histogramInput
This class is used to define a component for viewing overlaid layers.
std::auto_ptr< Ui::RasterHistogramWidgetForm > m_ui
An abstract class for raster data strucutures.
Definition: Raster.h:71
te::qt::widgets::Histogram * m_histogramOutput
URI C++ Library.
A class to represent a chart display.
Definition: ChartDisplay.h:65
te::qt::widgets::ChartStyle * m_chartStyle
te::qt::widgets::HistogramChart * m_histogramChartInput
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63
std::auto_ptr< te::rst::Raster > m_inputRaster