SegmenterAdvancedOptionsWizardPage.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  \file terralib/qt/widgets/rp/SegmenterAdvancedOptionsWizardPage.h
22 
23  \brief This file defines a class for a Segmenter Advanced Options Wizard page.
24 */
25 
26 #ifndef __TERRALIB_QT_WIDGETS_RP_INTERNAL_SEGMENTERADVANCEDOPTIONSWIZARDPAGE_H
27 #define __TERRALIB_QT_WIDGETS_RP_INTERNAL_SEGMENTERADVANCEDOPTIONSWIZARDPAGE_H
28 
29 // TerraLib
30 #include "../Config.h"
31 #include "../../../raster/Raster.h"
32 #include "../../../common/progress/ProgressManager.h"
33 #include "../../../dataaccess/datasource/DataSource.h"
34 #include "../../../dataaccess/datasource/DataSourceInfoManager.h"
35 #include "../../../dataaccess/datasource/DataSourceManager.h"
36 #include "../../../dataaccess/utils/Utils.h"
37 #include "../../../datatype/SimpleProperty.h"
38 #include "../../../geometry/GeometryProperty.h"
39 #include "../../../memory/DataSet.h"
40 #include "../../../memory/DataSetItem.h"
41 #include "../../widgets/layer/utils/DataSet2Layer.h"
42 #include "../progress/ProgressViewerDialog.h"
43 
44 // STL
45 #include <memory>
46 
47 // Qt
48 #include <QWizardPage>
49 
50 // Forward declaration
51 namespace Ui { class SegmenterAdvancedOptionsWizardPageForm; }
52 
53 namespace te
54 {
55  namespace qt
56  {
57  namespace widgets
58  {
59  /*!
60  \class SegmenterAdvancedOptionsWizardPage
61 
62  \brief This class is GUI used to define the segmenter advanced options parameters for the RP constast operation.
63  */
65  {
66  Q_OBJECT
67 
68  public:
69 
70  SegmenterAdvancedOptionsWizardPage(QWidget* parent = 0);
71 
73 
74  public:
75 
76  Ui::SegmenterAdvancedOptionsWizardPageForm* getForm() const;
77 
78  void applyVectorization();
79 
80  void set(te::map::AbstractLayerPtr layer);
81 
82  void setOutputLayerPath(const std::string& path);
83 
84  void setOutputLayerName(const std::string& name);
85 
86  te::map::AbstractLayerPtr getOutputLayer();
87 
88  protected:
89 
90  /*! Function used to create the output dataset type */
91  std::unique_ptr<te::da::DataSetType> createDataSetType(std::string dataSetName, int srid);
92 
93  /*! Function used to create the output data */
94  std::unique_ptr<te::mem::DataSet> createDataSet(te::da::DataSetType* dsType, std::vector<te::gm::Geometry*>& geoms, std::vector< double >& geomsValues );
95 
96  /*! Function used to save the output dataset */
97  void saveDataSet(te::mem::DataSet* dataSet, te::da::DataSetType* dsType, te::da::DataSourcePtr ds, std::string dataSetName);
98 
99  private:
100 
101  std::unique_ptr<Ui::SegmenterAdvancedOptionsWizardPageForm> m_ui;
102 
104 
106 
107  std::string m_path;
108 
109  std::string m_name;
110  };
111 
112  } // end namespace widgets
113  } // end namespace qt
114 } // end namespace te
115 
116 #endif // __TERRALIB_QT_WIDGETS_RP_INTERNAL_SEGMENTERADVANCEDOPTIONSWIZARDPAGE_H
boost::shared_ptr< DataSource > DataSourcePtr
Definition: DataSource.h:1440
A class that models the description of a dataset.
Definition: DataSetType.h:72
std::unique_ptr< Ui::SegmenterAdvancedOptionsWizardPageForm > m_ui
Implementation of a random-access dataset class for the TerraLib In-Memory Data Access driver...
Definition: DataSet.h:65
This class is GUI used to define the segmenter advanced options parameters for the RP constast operat...
URI C++ Library.
#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