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 
45 namespace Ui { class GeometricOpDialogForm; }
46 
47 namespace 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 
73  bool hasConvexHull();
74 
75  bool hasCentroid();
76 
77  bool hasMBR();
78 
79  bool hasArea();
80 
81  bool hasLine();
82 
83  bool hasPerimeter();
84 
86 
88 
89  protected slots:
90 
91  void onLayerComboBoxChanged(int index);
92 
93  void onAttributeComboBoxChanged(int index);
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
te::vp::GeometricOpDialog::onAttributeComboBoxChanged
void onAttributeComboBoxChanged(int index)
te::vp::GeometricOpDialog::enableOperations
void enableOperations(te::gm::GeomType type)
te
TerraLib.
Definition: AddressGeocodingOp.h:52
te::vp::GeometricOpDialog::~GeometricOpDialog
~GeometricOpDialog()
te::vp::GeometricOpDialog::onTargetDatasourceToolButtonPressed
void onTargetDatasourceToolButtonPressed()
te::map::AbstractLayerPtr
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
Definition: AbstractLayer.h:626
te::vp::GeometricOpDialog::onOkPushButtonClicked
void onOkPushButtonClicked()
te::da::DataSourceInfoPtr
boost::shared_ptr< DataSourceInfo > DataSourceInfoPtr
Definition: DataSourceInfo.h:107
te::vp::GeometricOpDialog::onAllLayerOperationToggled
void onAllLayerOperationToggled()
te::vp::GeometricOpDialog::hasCentroid
bool hasCentroid()
te::vp::GeometricOpDialog::m_attribute
std::string m_attribute
Properties related to the selected Layer to do the dissolve before operation.
Definition: GeometricOpDialog.h:120
te::vp::GeometricOpDialog::setLayers
void setLayers(std::list< te::map::AbstractLayerPtr > layers)
te::vp::GeometricOpDialog::m_outputDatasource
te::da::DataSourceInfoPtr m_outputDatasource
DataSource information.
Definition: GeometricOpDialog.h:117
te::vp::GeometricOpDialog::hasConvexHull
bool hasConvexHull()
te::vp::GeometricOpObjStrategy
GeometricOpObjStrategy
Defines the strategy used for the processing of the input geometries.
Definition: Enums.h:116
te::vp::GeometricOpDialog::m_selectedLayer
te::map::AbstractLayerPtr m_selectedLayer
Selected layer to operation.
Definition: GeometricOpDialog.h:116
te::vp::GeometricOpDialog
This class is GUI used to define the wizard for the VP geometric operation.
Definition: GeometricOpDialog.h:58
te::vp::GeometricOpDialog::onTargetFileToolButtonPressed
void onTargetFileToolButtonPressed()
te::vp::GeometricOpDialog::hasPerimeter
bool hasPerimeter()
te::vp::GeometricOpDialog::getInLayer
te::map::AbstractLayerPtr getInLayer()
Ui
Definition: ConfigInputAddressDialog.h:44
TEVPEXPORT
#define TEVPEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:61
te::vp::GeometricOpDialog::onCancelPushButtonClicked
void onCancelPushButtonClicked()
te::vp::GeometricOpDialog::m_outputLayer
std::vector< te::map::AbstractLayerPtr > m_outputLayer
Generated Layer.
Definition: GeometricOpDialog.h:118
slots
#define slots
Definition: VirtualMachine.h:48
te::vp::GeometricOpDialog::hasArea
bool hasArea()
te::vp::GeometricOpDialog::hasLine
bool hasLine()
te::vp::GeometricOpDialog::GeometricOpDialog
GeometricOpDialog(QWidget *parent=0, Qt::WindowFlags f=0)
te::vp::GeometricOpDialog::m_layers
std::list< te::map::AbstractLayerPtr > m_layers
List of layers.
Definition: GeometricOpDialog.h:115
te::vp::GeometricOpDialog::m_ops
std::vector< te::vp::GeometricOperation > m_ops
Operations selected to be executed.
Definition: GeometricOpDialog.h:119
te::vp::GeometricOpDialog::getObjectStrategy
te::vp::GeometricOpObjStrategy getObjectStrategy()
te::vp::GeometricOpDialog::m_toFile
bool m_toFile
Flag to indicate if the output will be stored in a file.
Definition: GeometricOpDialog.h:121
te::vp::GeometricOpDialog::onLayerComboBoxChanged
void onLayerComboBoxChanged(int index)
te::vp::GeometricOpDialog::getOutLayer
std::vector< te::map::AbstractLayerPtr > getOutLayer()
te::vp::GeometricOpDialog::onSrsToolButtonClicked
void onSrsToolButtonClicked()
te::vp::GeometricOpDialog::hasMBR
bool hasMBR()
te::vp::GeometricOpDialog::onAttributeOperationToggled
void onAttributeOperationToggled()
te::vp::GeometricOpDialog::onAllObjectsToggled
void onAllObjectsToggled()
te::gm::GeomType
GeomType
Each enumerated type is compatible with a Well-known Binary (WKB) type code.
Definition: Enums.h:42
te::vp::GeometricOpDialog::m_ui
std::unique_ptr< Ui::GeometricOpDialogForm > m_ui
Qt Dialog Form.
Definition: GeometricOpDialog.h:113
te::vp::GeometricOpDialog::m_newSRID
int m_newSRID
newSRID to compure tabular operations (Area, Perimeter, Line).
Definition: GeometricOpDialog.h:122