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