ContrastWizardPage.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/ContrastWizardPage.h
22 
23  \brief This file defines a class for a Contrast Wizard page.
24 */
25 
26 #ifndef __TERRALIB_QT_WIDGETS_RP_INTERNAL_CONTRASTWIZARDPAGE_H
27 #define __TERRALIB_QT_WIDGETS_RP_INTERNAL_CONTRASTWIZARDPAGE_H
28 
29 // TerraLib
30 #ifndef Q_MOC_RUN
31 #include "../../../maptools/AbstractLayer.h"
32 #endif
33 #include "../../../rp/Contrast.h"
34 #include "../Config.h"
35 
36 // STL
37 #include <memory>
38 
39 // Qt
40 #include <QWizardPage>
41 
42 // Forward declaration
43 namespace Ui { class ContrastWizardPageForm; }
44 
45 namespace te
46 {
47  namespace qt
48  {
49  namespace widgets
50  {
51  class RasterHistogramWidget;
52  class RasterNavigatorWidget;
53 
54  /*!
55  \class ContrastWizardPage
56 
57  \brief This class is GUI used to define the contrast parameters for the RP constast operation.
58  */
59  class TEQTWIDGETSEXPORT ContrastWizardPage : public QWizardPage
60  {
61  Q_OBJECT
62 
63  public:
64 
65  ContrastWizardPage(QWidget* parent = 0);
66 
68 
69  bool isComplete() const;
70 
71  public:
72 
73  /*!
74  \brief This method is used to set the selected layer for contrast operation
75 
76  \param layer The layer ptr
77 
78  \note This layer MUST HAVE a valid raster object.
79  */
80  void set(te::map::AbstractLayerPtr layer);
81 
83 
84  te::rp::Contrast::InputParameters getInputParams();
85 
86  te::rp::Contrast::OutputParameters getOutputParams();
87 
88  protected:
89 
90  void fillContrastTypes();
91 
92  void listBands();
93 
94 
95  protected slots:
96 
97  void apply();
98 
99  void onContrastTypeComboBoxActivated(int index);
100 
101  void onCellClicked(int row, int column);
102 
103  void onMinValueSelected(int value, int band);
104 
105  void onMaxValueSelected(int value, int band);
106 
107  void onPreviewChanged();
108 
109  void drawHistogram();
110 
111  private:
112 
113  std::auto_ptr<Ui::ContrastWizardPageForm> m_ui;
114  std::auto_ptr<te::qt::widgets::RasterNavigatorWidget> m_navigator;
115  std::auto_ptr<te::qt::widgets::RasterHistogramWidget> m_histogramWidget;
116 
118  };
119 
120  } // end namespace widgets
121  } // end namespace qt
122 } // end namespace te
123 
124 #endif // __TERRALIB_QT_WIDGETS_RP_INTERNAL_CONTRASTWIZARDPAGE_H
std::auto_ptr< te::qt::widgets::RasterHistogramWidget > m_histogramWidget
Contrast input parameters.
Definition: Contrast.h:65
std::auto_ptr< Ui::ContrastWizardPageForm > m_ui
This class is GUI used to define the contrast parameters for the RP constast operation.
URI C++ Library.
std::auto_ptr< te::qt::widgets::RasterNavigatorWidget > m_navigator
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63
Contrast output parameters.
Definition: Contrast.h:184
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr