PCAWizard.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_PCAWIZARD_H
22 #define TE_QT_WIDGETS_PCAWIZARD_H
23 
24 // TerraLib
25 #ifndef Q_MOC_RUN
26 #include "../../../maptools/AbstractLayer.h"
27 #endif
28 #include "../Config.h"
29 //Qt
30 #include <QWizard>
31 
32 //STL
33 #include <memory>
34 
35 namespace te
36 {
37  namespace qt
38  {
39  namespace widgets
40  {
41  //Forward declarations
42  class PCAWizardPage;
43  class LayerSearchWizardPage;
44  class RasterInfoWizardPage;
45 
46  class TEQTWIDGETSEXPORT PCAWizard : public QWizard
47  {
48  Q_OBJECT
49 
50  public:
51 
52  /*! \brief Constructor. */
53  PCAWizard(QWidget* parent=0);
54 
55  /*! \brief Destructor. */
56  ~PCAWizard();
57 
58  /*!
59  \brief Overridden function that checks if the current page's configuration is done in order to proceed to the next page.
60 
61  \return A boolean that indicates if the current page's configuration is finished.
62  */
63  bool validateCurrentPage();
64 
65  /*!
66  \brief This function sets the list of layers from which the raster that will be sliced will come from.
67 
68  \param layerList The list of AbstractLayerPtrs that will be used to get a raster from.
69  */
70  void setList(std::list<te::map::AbstractLayerPtr>& layerList);
71 
72  /*!
73  \brief This function returns the layer that has been created by the wizard with the sliced raster.
74 
75  \retunrn A new AbstractLayerPtr containing the sliced raster.
76  */
77  te::map::AbstractLayerPtr getOutputLayer();
78 
79  /*!
80  \brief This function sets the layer that contains the raster that will be sliced.
81 
82  \param layer The layer from which the raster will be obtained.
83  */
84  void setLayer(te::map::AbstractLayerPtr layer);
85 
86  protected:
87 
88  void addPages();
89 
90  bool execute();
91 
92  protected slots:
93 
94  void onPageChanged(int index);
95 
96  private:
97 
98  //No copy allowed
99  PCAWizard(const PCAWizard& rhs);
100  PCAWizard& operator=(const PCAWizard& rhs);
101 
102 
103  std::unique_ptr<te::qt::widgets::PCAWizardPage> m_wizardPage; //!< The wizard page used to define the PCA parameters
104  std::unique_ptr<te::qt::widgets::LayerSearchWizardPage> m_layerSearchPage; //!< The wizard page used to select an input layer
105  std::unique_ptr<te::qt::widgets::RasterInfoWizardPage> m_rasterInfoPage; //!< The wizard page used to define the output layer parameters
106 
107 
109  };
110  } // namespace widgets
111  } // namespace qt
112 } // namespace te
113 
114 #endif // TE_QT_WIDGETS_PCAWIZARD_H
#define slots
std::unique_ptr< te::qt::widgets::LayerSearchWizardPage > m_layerSearchPage
The wizard page used to select an input layer.
Definition: PCAWizard.h:104
te::map::AbstractLayerPtr m_outputLayer
Definition: PCAWizard.h:108
URI C++ Library.
std::unique_ptr< te::qt::widgets::RasterInfoWizardPage > m_rasterInfoPage
The wizard page used to define the output layer parameters.
Definition: PCAWizard.h:105
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63
std::unique_ptr< te::qt::widgets::PCAWizardPage > m_wizardPage
The wizard page used to define the PCA parameters.
Definition: PCAWizard.h:103
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr