Loading...
Searching...
No Matches
VectorToVectorDialog.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/VectorToVectorDialog.h
22
23 \brief Raster to vector attributefill dialog.
24*/
25
26#ifndef __TERRALIB_ATTRIBUTEFILL_INTERNAL_VECTORTOVECTORDIALOG_H
27#define __TERRALIB_ATTRIBUTEFILL_INTERNAL_VECTORTOVECTORDIALOG_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#include "../Enums.h"
38
39// STL
40#include <list>
41#include <map>
42#include <memory>
43#include <vector>
44
45// Qt
46#include <QDialog>
47
48namespace Ui { class VectorToVectorDialogForm; }
49
50// Forward declarations
51class QListWidgetItem;
52class QModelIndex;
53class QTreeWidgetItem;
54
55namespace te
56{
57 namespace attributefill
58 {
60 {
61 Q_OBJECT
62
63 public:
64
65 VectorToVectorDialog(QWidget* parent = 0, Qt::WindowFlags f = 0);
66
68
69
70 /*!
71 \brief Set the layer that can be used
72
73 \param layers List of AbstractLayerPtr
74 */
75 void setLayers(std::list<te::map::AbstractLayerPtr> layers);
76
77 /*!
78 \brief Get the generated layer.
79
80 \return the generated layer.
81 */
83
84 private:
85
87
89
91
93
94 std::map<std::string, std::vector<te::attributefill::OperationType> > getSelections();
95
97
99
100 bool isValidPropertyType(const int type);
101
102 bool isClassType(const int type);
103
105
106 bool isNumProperty(const int type);
107
108 protected slots:
109
111
113
115
117
119
121
123
125
127
128 void onStatisticsListWidgetItemPressed(QListWidgetItem * item);
129
130 private:
131
132 typedef std::map<te::stat::StatisticalSummary, std::string> StaticalSummaryMap;
133
134 std::unique_ptr<Ui::VectorToVectorDialogForm> m_ui; //!< User interface.
135 te::da::DataSourceInfoPtr m_outputDatasource; //!< DataSource information.
136 std::list<te::map::AbstractLayerPtr> m_layers; //!< List of layers.
137 std::vector<std::string> m_outputAttributes;
139 std::string m_path; //!< Output layer path;
141 };
142 } // end namespace attributefill
143} // end namespace te
144
145#endif // __TERRALIB_ATTRIBUTEFILL_INTERNAL_VECTORTOVECTORDIALOG_H
bool isPoint(te::gm::GeomType type)
std::map< std::string, std::vector< te::attributefill::OperationType > > getSelections()
std::unique_ptr< Ui::VectorToVectorDialogForm > m_ui
User interface.
te::map::AbstractLayerPtr getCurrentToLayer()
void setLayers(std::list< te::map::AbstractLayerPtr > layers)
Set the layer that can be used.
void setFunctionsByLayer(te::map::AbstractLayerPtr layer)
te::gm::GeomType getCurrentToLayerGeomType()
te::map::AbstractLayerPtr getCurrentFromLayer()
bool isValidPropertyType(const int type)
std::list< te::map::AbstractLayerPtr > m_layers
List of layers.
te::map::AbstractLayerPtr getLayer()
Get the generated layer.
bool isPolygon(te::gm::GeomType type)
te::da::DataSourceInfoPtr m_outputDatasource
DataSource information.
VectorToVectorDialog(QWidget *parent=0, Qt::WindowFlags f=0)
std::map< te::stat::StatisticalSummary, std::string > StaticalSummaryMap
void onStatisticsListWidgetItemPressed(QListWidgetItem *item)
void onFromLayerComboBoxCurrentIndexChanged(int index)
void onToLayerComboBoxCurrentIndexChanged(int index)
boost::shared_ptr< DataSourceInfo > DataSourceInfoPtr
GeomType
Each enumerated type is compatible with a Well-known Binary (WKB) type code.
Definition Enums.h:42
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
TerraLib.
#define slots
#define TEATTRIBUTEFILLEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition Config.h:61