RasterToVectorDialog.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/attributefill/qt/RasterToVectorDialog.h
22 
23  \brief Raster to vector attributefill dialog.
24 */
25 
26 #ifndef __TERRALIB_ATTRIBUTEFILL_INTERNAL_RASTERTOVECTORDIALOG_H
27 #define __TERRALIB_ATTRIBUTEFILL_INTERNAL_RASTERTOVECTORDIALOG_H
28 
29 // TerraLib
30 #include "../../dataaccess/datasource/DataSourceInfo.h"
31 #include "../../datatype/Property.h"
32 #include "../../maptools/AbstractLayer.h"
33 #include "../../statistics/core/Utils.h"
34 #include "../Config.h"
35 
36 // STL
37 #include <list>
38 #include <map>
39 #include <memory>
40 
41 // Qt
42 #include <QDialog>
43 
44 namespace Ui { class RasterToVectorDialogForm; }
45 
46 // Forward declarations
47 class QListWidgetItem;
48 class QModelIndex;
49 class QTreeWidgetItem;
50 
51 namespace te
52 {
53  namespace attributefill
54  {
56  {
57  Q_OBJECT
58 
59  public:
60 
61  RasterToVectorDialog(QWidget* parent = 0, Qt::WindowFlags f = 0);
62 
64 
65 
66  /*!
67  \brief Set the layer that can be used
68 
69  \param layers List of AbstractLayerPtr
70  */
71  void setLayers(std::list<te::map::AbstractLayerPtr> layers);
72 
73  /*!
74  \brief Get the generated layer.
75 
76  \return the generated layer.
77  */
78  te::map::AbstractLayerPtr getLayer();
79 
80  /*!
81  \brief Get the selected bands based on selected QListWidgetItem.
82 
83  \return a Vector with selected bands.
84  */
85  std::vector<unsigned int> getSelectedBands();
86 
87  /*!
88  \brief Get the selected statistics based on selected QListWidgetItem.
89 
90  \return a Vector with selected statistics.
91  */
92  std::vector<te::stat::StatisticalSummary> getSelectedStatistics();
93 
94  /*!
95  \brief Get the based on selected QListWidgetItem.
96 
97  \return a Vector with selected statistics.
98  */
99  bool getValueOption();
100 
101 
102  protected slots:
103 
104  void onRasterComboBoxChanged(int index);
105 
106  void onVectorComboBoxChanged(int index);
107 
108  void onTargetDatasourceToolButtonPressed();
109 
110  void onTargetFileToolButtonPressed();
111 
112  void onOkPushButtonClicked();
113 
114  void onCancelPushButtonClicked();
115 
116  private:
117 
118  std::auto_ptr<Ui::RasterToVectorDialogForm> m_ui; //!< User interface.
119  te::da::DataSourceInfoPtr m_outputDatasource; //!< DataSource information.
120  std::list<te::map::AbstractLayerPtr> m_layers; //!< List of layers.
123  te::map::AbstractLayerPtr m_outLayer; //!< Generated Layer.
124  std::string m_path; //!< Output layer path;
125  bool m_toFile;
126  bool m_texture;
128  };
129  } // end namespace attributefill
130 } // end namespace te
131 
132 #endif // __TERRALIB_ATTRIBUTEFILL_INTERNAL_RASTERTOVECTORDIALOG_H
te::map::AbstractLayerPtr m_vectorLayer
Vector layer.
te::map::AbstractLayerPtr m_outLayer
Generated Layer.
#define TEATTRIBUTEFILLEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:61
std::string m_path
Output layer path;.
std::auto_ptr< Ui::RasterToVectorDialogForm > m_ui
User interface.
URI C++ Library.
std::list< te::map::AbstractLayerPtr > m_layers
List of layers.
te::da::DataSourceInfoPtr m_outputDatasource
DataSource information.
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
boost::shared_ptr< DataSourceInfo > DataSourceInfoPtr
te::map::AbstractLayerPtr m_rasterLayer
Raster layer.