VectorizationWizard.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_VECTORIZATIONWIZARD_H
22 #define TE_QT_WIDGETS_VECTORIZATIONWIZARD_H
23 
24 //TerraLib
25 #include "../Config.h"
26 #include "../../../dataaccess/datasource/DataSource.h"
27 #include "../../../maptools/AbstractLayer.h"
28 
29 //Qt
30 #include <QWizard>
31 
32 //STL
33 #include <memory>
34 
35 namespace te
36 {
37  //forward declarations
38  namespace da { class DataSetType; }
39  namespace mem { class DataSet; }
40 
41  namespace qt
42  {
43  namespace widgets
44  {
45  //Forward declarations
46  class VectorizationWizardPage;
47  class LayerSearchWizardPage;
48 
49  class TEQTWIDGETSEXPORT VectorizationWizard : public QWizard
50  {
51  public:
52 
53  VectorizationWizard(QWidget* parent=0);
54 
56 
57  bool validateCurrentPage();
58 
59  void setList(std::list<te::map::AbstractLayerPtr>& layerList);
60 
61  te::map::AbstractLayerPtr getOutputLayer();
62 
63  protected:
64 
65  void addPages();
66 
67  bool execute();
68 
69  /*! Function used to create the output dataset type */
70  std::auto_ptr<te::da::DataSetType> createDataSetType(std::string dataSetName, int srid);
71 
72  /*! Function used to create the output data */
73  std::auto_ptr<te::mem::DataSet> createDataSet(te::da::DataSetType* dsType, std::vector<te::gm::Geometry*>& geoms);
74 
75  /*! Function used to save the output dataset */
76  void saveDataSet(te::mem::DataSet* dataSet, te::da::DataSetType* dsType, te::da::DataSourcePtr ds, std::string dataSetName);
77 
78  private:
79 
80  std::auto_ptr<te::qt::widgets::VectorizationWizardPage> m_vectorPage;
81  std::auto_ptr<te::qt::widgets::LayerSearchWizardPage> m_layerSearchPage;
82 
84  };
85 
86  } // namespace widgets
87  } // namespace qt
88 } // namespace te
89 
90 #endif // TE_QT_WIDGETS_VECTORIZATIONWIZARD_H
te::map::AbstractLayerPtr m_outputLayer
boost::shared_ptr< DataSource > DataSourcePtr
Definition: DataSource.h:1435
A class that models the description of a dataset.
Definition: DataSetType.h:72
Implementation of a random-access dataset class for the TerraLib In-Memory Data Access driver...
Definition: DataSet.h:65
std::auto_ptr< te::qt::widgets::VectorizationWizardPage > m_vectorPage
URI C++ Library.
std::auto_ptr< te::qt::widgets::LayerSearchWizardPage > m_layerSearchPage
#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