Loading...
Searching...
No Matches
GeometricOpDialog.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/vp/qt/GeometricOpDialog.h
22
23 \brief A Qt dialog that allows users to run the basic geometric operations
24 defined by VP module.
25*/
26
27#ifndef __TERRALIB_VP_INTERNAL_GEOMETRICOPDIALOG_H
28#define __TERRALIB_VP_INTERNAL_GEOMETRICOPDIALOG_H
29
30// TerraLib
31#ifndef Q_MOC_RUN
32#include "../../dataaccess/datasource/DataSourceInfo.h"
33#include "../../maptools/AbstractLayer.h"
34#endif
35#include "../Config.h"
36#include "../Enums.h"
37
38// STL
39#include <list>
40#include <memory>
41
42// Qt
43#include <QDialog>
44
45namespace Ui { class GeometricOpDialogForm; }
46
47namespace te
48{
49 namespace vp
50 {
51 /*!
52 \class GeometricOpDialog
53
54 \brief This class is GUI used to define the wizard for the VP geometric
55 operation.
56 */
57 class TEVPEXPORT GeometricOpDialog : public QDialog
58 {
59 Q_OBJECT
60
61 public:
62
63 GeometricOpDialog(QWidget* parent = 0, Qt::WindowFlags f = 0);
64
66
67 void setLayers(std::list<te::map::AbstractLayerPtr> layers);
68
70
71 std::vector<te::map::AbstractLayerPtr> getOutLayer();
72
74
76
77 bool hasMBR();
78
79 bool hasArea();
80
81 bool hasLine();
82
84
86
88
89 protected slots:
90
91 void onLayerComboBoxChanged(int index);
92
94
96
98
100
102
104
106
108
110
111 private:
112
113 std::unique_ptr<Ui::GeometricOpDialogForm> m_ui; //!< Qt Dialog Form
114
115 std::list<te::map::AbstractLayerPtr> m_layers; //!< List of layers.
116 te::map::AbstractLayerPtr m_selectedLayer; //!< Selected layer to operation
117 te::da::DataSourceInfoPtr m_outputDatasource; //!< DataSource information.
118 std::vector<te::map::AbstractLayerPtr> m_outputLayer; //!< Generated Layer.
119 std::vector<te::vp::GeometricOperation> m_ops; //!< Operations selected to be executed.
120 std::string m_attribute; //!< Properties related to the selected Layer to do the dissolve before operation.
121 bool m_toFile; //!< Flag to indicate if the output will be stored in a file.
122 int m_newSRID; //!< newSRID to compure tabular operations (Area, Perimeter, Line).
123 };
124 } // end namespace vp
125} // end namespace te
126
127#endif // __TERRALIB_VP_INTERNAL_GEOMETRICOPDIALOG_H
This class is GUI used to define the wizard for the VP geometric operation.
std::string m_attribute
Properties related to the selected Layer to do the dissolve before operation.
int m_newSRID
newSRID to compure tabular operations (Area, Perimeter, Line).
void onTargetDatasourceToolButtonPressed()
std::unique_ptr< Ui::GeometricOpDialogForm > m_ui
Qt Dialog Form.
te::da::DataSourceInfoPtr m_outputDatasource
DataSource information.
bool m_toFile
Flag to indicate if the output will be stored in a file.
void onLayerComboBoxChanged(int index)
GeometricOpDialog(QWidget *parent=0, Qt::WindowFlags f=0)
std::vector< te::map::AbstractLayerPtr > getOutLayer()
void setLayers(std::list< te::map::AbstractLayerPtr > layers)
te::vp::GeometricOpObjStrategy getObjectStrategy()
std::vector< te::map::AbstractLayerPtr > m_outputLayer
Generated Layer.
std::list< te::map::AbstractLayerPtr > m_layers
List of layers.
te::map::AbstractLayerPtr getInLayer()
void enableOperations(te::gm::GeomType type)
void onAttributeComboBoxChanged(int index)
std::vector< te::vp::GeometricOperation > m_ops
Operations selected to be executed.
te::map::AbstractLayerPtr m_selectedLayer
Selected layer to operation.
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
GeometricOpObjStrategy
Defines the strategy used for the processing of the input geometries.
Definition: Enums.h:116
TerraLib.
#define slots
#define TEVPEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:61