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 #include "../Config.h"
26 #include "../../../maptools/AbstractLayer.h"
27 
28 //Qt
29 #include <QWizard>
30 
31 //STL
32 #include <memory>
33 
34 namespace te
35 {
36  namespace qt
37  {
38  namespace widgets
39  {
40  //Forward declarations
41  class RasterSlicingWizardPage;
42  class LayerSearchWizardPage;
43  class RasterInfoWizardPage;
44 
45  class TEQTWIDGETSEXPORT RasterSlicingWizard : public QWizard
46  {
47  public:
48 
49  /*! \brief Constructor. */
50  RasterSlicingWizard(QWidget* parent=0);
51 
52  /*! \brief Destructor. */
54 
55  /*!
56  \brief Overridden function that checks if the current page's configuration is done in order to proceed to the next page.
57 
58  \return A boolean that indicates if the current page's configuration is finished.
59  */
60  bool validateCurrentPage();
61 
62  /*!
63  \brief This function sets the list of layers from which the raster that will be sliced will come from.
64 
65  \param layerList The list of AbstractLayerPtrs that will be used to get a raster from.
66  */
67  void setList(std::list<te::map::AbstractLayerPtr>& layerList);
68 
69  /*!
70  \brief This function returns the layer that has been created by the wizard with the sliced raster.
71 
72  \retunrn A new AbstractLayerPtr containing the sliced raster.
73  */
74  te::map::AbstractLayerPtr getOutputLayer();
75 
76  /*!
77  \brief This function sets the envelope that will be used to trim tha raster if the user requests it.
78 
79  \param extent A reference to the envelope that can be used to trim tha raster.
80  */
81  void setExtent(const te::gm::Envelope& extent);
82 
83  /*!
84  \brief This function sets the srid of the display when the wizard was initiated.
85 
86  \param srid The current srid of the display.
87  */
88  void setSRID(int srid = 0);
89 
90  protected:
91 
92  void addPages();
93 
94  bool execute();
95 
96  private:
97 
98  //No copy allowed
100  RasterSlicingWizard& operator=(const RasterSlicingWizard& rhs);
101 
102 
103  std::auto_ptr<te::qt::widgets::RasterSlicingWizardPage> m_wizardPage; //!< The wizard page used to define the slicing parameters
104  std::auto_ptr<te::qt::widgets::LayerSearchWizardPage> m_layerSearchPage; //!< The wizard page used to select an input layer
105  std::auto_ptr<te::qt::widgets::RasterInfoWizardPage> m_rasterInfoPage; //!< The wizard page used to define the output layer parameters
106 
108  };
109  } // namespace widgets
110  } // namespace qt
111 } // namespace te
112 
113 #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