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 #ifndef Q_MOC_RUN
31 #include "../../../maptools/AbstractLayer.h"
32 #endif
33 #include "../Config.h"
34 
35 // STL
36 #include <memory>
37 
38 // Qt
39 #include <QWidget>
40 
41 //QWT
42 #include <qwt_plot_marker.h>
43 
44 namespace Ui { class RasterHistogramWidgetForm; }
45 
46 namespace te
47 {
48  namespace rst { class Raster; }
49 
50  namespace qt
51  {
52  namespace widgets
53  {
54  class ChartStyle;
55  class ChartDisplay;
56  class Histogram;
57  class HistogramChart;
58  /*!
59  \class RasterHistogramWidget
60 
61  \brief This class is used to define a component for viewing overlaid layers.
62  */
64  {
65  Q_OBJECT
66 
67  public:
68 
69  RasterHistogramWidget(QWidget* parent = 0, Qt::WindowFlags f = 0);
70 
72 
73  Ui::RasterHistogramWidgetForm* getForm() const;
74 
75  void setInputRaster(te::rst::Raster* raster);
76 
77  void setOutputRaster(te::rst::Raster* raster);
78 
79  void drawHistogram(int band);
80 
81  void setMinimumValueEnabled(bool enable);
82 
83  void updateMinimumValueLine(int value, bool replot = false);
84 
85  void updateMinimumValueLabel(QString value);
86 
87  void setMaximumValueEnabled(bool enable);
88 
89  void updateMaximumValueLine(int value, bool replot = false);
90 
91  void updateMaximumValueLabel(QString value);
92 
93 
94  protected slots:
95 
96  void onApplyToolButtonClicked();
97 
98  void onLeftPointSelected(const QPointF& point);
99 
100  void onRigthPointSelected(const QPointF& point);
101 
102  signals:
103 
104  void minValueSelected(int value, int band);
105 
106  void maxValueSelected(int value, int band);
107 
108 
109  private:
110 
111  std::auto_ptr<Ui::RasterHistogramWidgetForm> m_ui;
112 
113  std::auto_ptr<te::rst::Raster> m_inputRaster;
114  std::auto_ptr<te::rst::Raster> m_outputRaster;
115 
118 
121 
124 
125  QwtPlotMarker* m_minValueLine;
126  QwtPlotMarker* m_maxValueLine;
127  };
128 
129  } // end namespace widgets
130  } // end namespace qt
131 } // end namespace te
132 
133 #endif // __TERRALIB_QT_WIDGETS_CANVAS_INTERNAL_RASTERHISTOGRAMWIDGET_H
134 
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