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. */
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  */
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  */
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  */
85 
86  signals:
87 
89 
90  protected:
91 
92  void addPages();
93 
94  bool execute();
95 
96  protected slots:
97 
98  void onPageChanged(int index);
99 
100  private:
101 
102  //No copy allowed
103  PCAWizard(const PCAWizard& rhs);
105 
106 
107  std::unique_ptr<te::qt::widgets::PCAWizardPage> m_wizardPage; //!< The wizard page used to define the PCA parameters
108  std::unique_ptr<te::qt::widgets::LayerSearchWizardPage> m_layerSearchPage; //!< The wizard page used to select an input layer
109  std::unique_ptr<te::qt::widgets::RasterInfoWizardPage> m_rasterInfoPage; //!< The wizard page used to define the output layer parameters
110 
111 
113  };
114  } // namespace widgets
115  } // namespace qt
116 } // namespace te
117 
118 #endif // TE_QT_WIDGETS_PCAWIZARD_H
void onPageChanged(int index)
PCAWizard & operator=(const PCAWizard &rhs)
PCAWizard(QWidget *parent=0)
Constructor.
std::unique_ptr< te::qt::widgets::LayerSearchWizardPage > m_layerSearchPage
The wizard page used to select an input layer.
Definition: PCAWizard.h:108
std::unique_ptr< te::qt::widgets::PCAWizardPage > m_wizardPage
The wizard page used to define the PCA parameters.
Definition: PCAWizard.h:107
void addLayer(te::map::AbstractLayerPtr layer)
void setList(std::list< te::map::AbstractLayerPtr > &layerList)
This function sets the list of layers from which the raster that will be sliced will come from.
te::map::AbstractLayerPtr m_outputLayer
Definition: PCAWizard.h:112
void setLayer(te::map::AbstractLayerPtr layer)
This function sets the layer that contains the raster that will be sliced.
bool validateCurrentPage()
Overridden function that checks if the current page's configuration is done in order to proceed to th...
std::unique_ptr< te::qt::widgets::RasterInfoWizardPage > m_rasterInfoPage
The wizard page used to define the output layer parameters.
Definition: PCAWizard.h:109
PCAWizard(const PCAWizard &rhs)
te::map::AbstractLayerPtr getOutputLayer()
This function returns the layer that has been created by the wizard with the sliced raster.
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
TerraLib.
#define slots
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63