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