RasterSlicingWizard.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_RASTERSLICINGWIZARD_H
22 #define TE_QT_WIDGETS_RASTERSLICINGWIZARD_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 RasterSlicingWizardPage;
43  class LayerSearchWizardPage;
44  class RasterInfoWizardPage;
45 
46  class TEQTWIDGETSEXPORT RasterSlicingWizard : public QWizard
47  {
48  public:
49 
50  /*! \brief Constructor. */
51  RasterSlicingWizard(QWidget* parent=0);
52 
53  /*! \brief Destructor. */
55 
56  /*!
57  \brief Overridden function that checks if the current page's configuration is done in order to proceed to the next page.
58 
59  \return A boolean that indicates if the current page's configuration is finished.
60  */
61  bool validateCurrentPage();
62 
63  /*!
64  \brief This function sets the list of layers from which the raster that will be sliced will come from.
65 
66  \param layerList The list of AbstractLayerPtrs that will be used to get a raster from.
67  */
68  void setList(std::list<te::map::AbstractLayerPtr>& layerList);
69 
70  /*!
71  \brief This function returns the layer that has been created by the wizard with the sliced raster.
72 
73  \retunrn A new AbstractLayerPtr containing the sliced raster.
74  */
75  te::map::AbstractLayerPtr getOutputLayer();
76 
77  /*!
78  \brief This function sets the envelope that will be used to trim tha raster if the user requests it.
79 
80  \param extent A reference to the envelope that can be used to trim tha raster.
81  */
82  void setExtent(const te::gm::Envelope& extent);
83 
84  /*!
85  \brief This function sets the srid of the display when the wizard was initiated.
86 
87  \param srid The current srid of the display.
88  */
89  void setSRID(int srid = 0);
90 
91  protected:
92 
93  void addPages();
94 
95  bool execute();
96 
97  private:
98 
99  //No copy allowed
101  RasterSlicingWizard& operator=(const RasterSlicingWizard& rhs);
102 
103 
104  std::auto_ptr<te::qt::widgets::RasterSlicingWizardPage> m_wizardPage; //!< The wizard page used to define the slicing parameters
105  std::auto_ptr<te::qt::widgets::LayerSearchWizardPage> m_layerSearchPage; //!< The wizard page used to select an input layer
106  std::auto_ptr<te::qt::widgets::RasterInfoWizardPage> m_rasterInfoPage; //!< The wizard page used to define the output layer parameters
107 
109  };
110  } // namespace widgets
111  } // namespace qt
112 } // namespace te
113 
114 #endif // TE_QT_WIDGETS_RASTERSLICINGWIZARD_H
std::auto_ptr< te::qt::widgets::LayerSearchWizardPage > m_layerSearchPage
The wizard page used to select an input layer.
An Envelope defines a 2D rectangular region.
Definition: Envelope.h:51
URI C++ Library.
std::auto_ptr< te::qt::widgets::RasterSlicingWizardPage > m_wizardPage
The wizard page used to define the slicing parameters.
te::map::AbstractLayerPtr m_outputLayer
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63
std::auto_ptr< te::qt::widgets::RasterInfoWizardPage > m_rasterInfoPage
The wizard page used to define the output layer parameters.
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr