PostClassificationWidget.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/PostClassificationWidget.h
22 
23  \brief This file has the PostClassificationWidget class.
24 */
25 
26 #ifndef __TERRALIB_QT_WIDGETS_CANVAS_INTERNAL_POSTCLASSIFICATIONWIDGET_H
27 #define __TERRALIB_QT_WIDGETS_CANVAS_INTERNAL_POSTCLASSIFICATIONWIDGET_H
28 
29 // TerraLib
30 #ifndef Q_MOC_RUN
31 #include "../../../maptools/AbstractLayer.h"
32 #endif
33 #include "../../../qt/widgets/rp/RpToolsWidget.h"
34 #include "../Config.h"
35 #include "InputLayerWidget.h"
36 #include "OutputRasterWidget.h"
37 
38 // STL
39 #include <memory>
40 
41 // Qt
42 #include <QWidget>
43 
44 namespace Ui { class PostClassificationWidgetForm; }
45 
46 namespace te
47 {
48  namespace rst { class Raster; }
49 
50  namespace qt
51  {
52  namespace widgets
53  {
54  //forward declaration
55  class Canvas;
56  class MapDisplay;
57 
58  /*!
59  \class PostClassificationWidget
60 
61  \brief This class is used to make post classification.
62  */
64  {
65  Q_OBJECT
66 
67  public:
68 
69  PostClassificationWidget(QWidget* parent = 0, Qt::WindowFlags f = 0);
70 
72 
73  Ui::PostClassificationWidgetForm* getForm() const;
74 
75  void setList(std::list<te::map::AbstractLayerPtr>& layerList);
76 
77  void setMapDisplay(te::qt::widgets::MapDisplay* mapDisplay);
78 
79  void setActionGroup(QActionGroup* actionGroup);
80 
81  bool execute();
82 
83  protected slots:
84 
85  void weightSliderValueChanged(int value);
86 
87  void thresholdSliderValueChanged(int value);
88 
89  void onPreviewCheckBoxToggled(bool isChecked);
90 
91  void onEnvelopeAcquired(te::gm::Envelope env);
92 
93  void onMapDisplayExtentChanged();
94 
95  signals:
96 
97  void geomAquired(te::gm::Polygon* poly);
98 
99  void addLayer(te::map::AbstractLayerPtr layer);
100 
101  protected:
102 
103  void getRasterFromROI();
104 
105  void applyPreview();
106 
107  void drawPreview(te::rst::Raster* raster);
108 
109  private:
110 
111  std::auto_ptr<Ui::PostClassificationWidgetForm> m_ui;
112  std::unique_ptr<te::qt::widgets::RpToolsWidget> m_navigator;
122  };
123 
124  } // end namespace widgets
125  } // end namespace qt
126 } // end namespace te
127 
128 #endif // __TERRALIB_QT_WIDGETS_CANVAS_INTERNAL_POSTCLASSIFICATIONWIDGET_H
129 
A widget to control the display of a set of layers.
Definition: MapDisplay.h:69
te::qt::widgets::OutputRasterWidget * m_outputWidget
This file has the OutputRasterWidget class.
std::auto_ptr< Ui::PostClassificationWidgetForm > m_ui
An Envelope defines a 2D rectangular region.
Definition: Envelope.h:51
This file has the InputLayerWidget class.
An abstract class for raster data strucutures.
Definition: Raster.h:71
URI C++ Library.
This class is used to set output layer.
This class is used to set input layer.
std::unique_ptr< te::qt::widgets::RpToolsWidget > m_navigator
This class is used to make post classification.
te::qt::widgets::InputLayerWidget * m_inputWidget
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
Definition: Geometry.h:74
A canvas built on top of Qt.
Definition: Canvas.h:54
Polygon is a subclass of CurvePolygon whose rings are defined by linear rings.
Definition: Polygon.h:50
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr