PCAWizardPage.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 #ifndef TE_QT_WIDGETS_PCAWIZARDPAGE_H
22 #define TE_QT_WIDGETS_PCAWIZARDPAGE_H
23 
24 //Terralib
25 #ifndef Q_MOC_RUN
26 #include "../../../dataaccess/datasource/DataSourceInfo.h"
27 #include "../../../maptools/AbstractLayer.h"
28 #endif
29 #include "../Config.h"
30 
31 //Qt
32 #include <QWizardPage>
33 
34 //STL
35 #include <memory>
36 
37 //Forward declarations
38 namespace Ui
39 {
40  class PCAWizardPageForm;
41 }
42 
43 namespace te
44 {
45  namespace se
46  {
47  class ColorMap;
48  }
49 
50  namespace qt
51  {
52  namespace widgets
53  {
54  class TEQTWIDGETSEXPORT PCAWizardPage : public QWizardPage
55  {
56  Q_OBJECT
57 
58  public:
59 
60  /*! \brief Constructor. */
61  PCAWizardPage(QWidget* parent = 0);
62 
63  /*! \brief Destructor. */
64  ~PCAWizardPage();
65 
66  /*!
67  \brief This function returns the bands from the raster taht will be used.
68 
69  \return A vector of band indexes.
70  */
71  std::vector< unsigned int > getSelectedBands() const;
72 
73  /*!
74  \brief This function returns the bands from the raster taht will be used.
75 
76  \return A vector of band indexes.
77  */
78  std::string getMatrixFileName() const;
79 
80  /*!
81  \brief This function returns the output raster data type.
82 
83  \return The output raster data type.
84  */
85  int getOutputRasterDataType() const;
86 
87  /*!
88  \brief This function sets the layer that contains the raster that will be sliced.
89 
90  \param layer The layer from which the raster will be obtained.
91  */
92  void setLayer(te::map::AbstractLayerPtr layer);
93 
94  /*!
95  In order for this function to return true:
96 
97  The color map taht will be used on the output layer can not be empty.
98 
99  \param A boolean that indicates if the page is complete.
100  */
101  bool isComplete() const;
102 
103  /*!
104  \brief Returnes true the inverse PCA option is selected.
105 
106  \return Returnes true the inverse PCA option is selected.
107 
108  */
109  bool inversePCASelected() const;
110 
111  protected:
112 
113  std::unique_ptr<Ui::PCAWizardPageForm> m_ui; //!< The wizard page form
114  std::unique_ptr<te::rst::Raster> m_raster; //!< The raster that will be processed
115  te::map::AbstractLayerPtr m_rasterLayer; //!< Testing a better way to show the chart
116 
117  protected slots:
118 
119  void inversePCACheckBoxToggled(bool checked);
120  void loadPCAMatrixFilePushButtonClicked( bool checked );
121 
122  private:
123 
124  //No copy allowed
125  PCAWizardPage(const PCAWizardPage& rhs);
126  PCAWizardPage& operator=(const PCAWizardPage& rhs);
127  };
128  } // namespace widgets
129  } // namespace qt
130 } // namespace te
131 
132 #endif // TE_QT_WIDGETS_PCAWIZARDPAGE_H
133 
#define slots
te::map::AbstractLayerPtr m_rasterLayer
Testing a better way to show the chart.
std::unique_ptr< Ui::PCAWizardPageForm > m_ui
The wizard page form.
std::unique_ptr< te::rst::Raster > m_raster
The raster that will be processed.
URI C++ Library.
#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