IdentityDialog.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/IdentityDialog.h
22 
23  \brief Identity operation dialog.
24 */
25 
26 #ifndef __TERRALIB_VP_QT_INTERNAL_IDENTITYDIALOG_H
27 #define __TERRALIB_VP_QT_INTERNAL_IDENTITYDIALOG_H
28 
29 // TerraLib
30 #ifndef Q_MOC_RUN
31 #include "../../dataaccess/datasource/DataSourceInfo.h"
32 #include "../../maptools/AbstractLayer.h"
33 #include "../AlgorithmParams.h"
34 #endif
35 #include "../Config.h"
36 
37 // STL
38 #include <map>
39 #include <memory>
40 
41 // Qt
42 #include <QDialog>
43 
44 namespace Ui { class IdentityDialogForm; }
45 
46 namespace te
47 {
48  namespace qt
49  {
50  namespace widgets
51  {
52  class DoubleInputListWidget;
53  }
54  }
55 
56  namespace vp
57  {
58  /*!
59  \class IdentityDialog
60 
61  \brief A dialog used to execute vector identity.
62  */
63  class TEVPEXPORT IdentityDialog : public QDialog
64  {
65  Q_OBJECT
66 
67  public:
68 
69  IdentityDialog(QWidget* parent = 0, Qt::WindowFlags f = 0);
70 
72 
73  struct DataStruct
74  {
76  {
77  m_dataSetType = 0;
78  m_dataSet = 0;
79  }
80 
83  };
84 
85  /*!
86  \brief Set the layer that can be used
87 
88  \param layers List of AbstractLayerPtr
89  */
90  void setLayers(std::list<te::map::AbstractLayerPtr> layers);
91 
93 
94  std::vector<std::string> getWarnings();
95 
96  protected:
97 
98  std::map<int, std::vector<std::string> > getSelectedProperties();
99 
101 
103 
105 
106  protected slots:
107 
109 
111 
113 
115 
117 
119 
120  private:
121 
122  std::unique_ptr<Ui::IdentityDialogForm> m_ui;
123  std::list<te::map::AbstractLayerPtr> m_layers; //!< The vector layers in Layer Explorer.
126 
127  std::vector<te::vp::InputParams> m_inputParams; //!< A vector of input parameters.
128  te::vp::AlgorithmParams* m_params; //!< Algorithm parameters.
129 
130  te::da::DataSourceInfoPtr m_outputDatasource; //!< DataSource information.
132 
133  bool m_toFile; //!< The result is in a file?
134  std::vector<std::string> m_warnings; //!< Warnings during the operation.
135 
136  std::unique_ptr<te::qt::widgets::DoubleInputListWidget>
138  };
139  } // end namespace vp
140 } // end namespace te
141 
142 #endif // __TERRALIB_VP_QT_INTERNAL_IDENTITYDIALOG_H
te::vp::IdentityDialog::updateIntersectionLayerComboBox
void updateIntersectionLayerComboBox()
te
TerraLib.
Definition: AddressGeocodingOp.h:52
te::vp::IdentityDialog::updateInputLayerComboBox
void updateInputLayerComboBox()
te::vp::IdentityDialog::m_outputDatasource
te::da::DataSourceInfoPtr m_outputDatasource
DataSource information.
Definition: IdentityDialog.h:130
te::map::AbstractLayerPtr
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
Definition: AbstractLayer.h:626
te::da::DataSourceInfoPtr
boost::shared_ptr< DataSourceInfo > DataSourceInfoPtr
Definition: DataSourceInfo.h:107
te::vp::AlgorithmParams
Definition: AlgorithmParams.h:52
te::vp::IdentityDialog::updateDoubleListWidget
void updateDoubleListWidget()
te::vp::IdentityDialog::m_inputDoubleInputListWidget
std::unique_ptr< te::qt::widgets::DoubleInputListWidget > m_inputDoubleInputListWidget
Definition: IdentityDialog.h:137
te::vp::IdentityDialog::onTargetFileToolButtonPressed
void onTargetFileToolButtonPressed()
te::vp::IdentityDialog::onTargetDatasourceToolButtonPressed
void onTargetDatasourceToolButtonPressed()
te::vp::IdentityDialog::m_warnings
std::vector< std::string > m_warnings
Warnings during the operation.
Definition: IdentityDialog.h:134
te::vp::IdentityDialog::~IdentityDialog
~IdentityDialog()
te::vp::IdentityDialog::m_toFile
bool m_toFile
The result is in a file?
Definition: IdentityDialog.h:133
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::IdentityDialog::m_layerResult
te::map::AbstractLayerPtr m_layerResult
Generated Layer.
Definition: IdentityDialog.h:131
te::vp::IdentityDialog::DataStruct
Definition: IdentityDialog.h:74
te::vp::IdentityDialog::m_layers
std::list< te::map::AbstractLayerPtr > m_layers
The vector layers in Layer Explorer.
Definition: IdentityDialog.h:123
te::vp::IdentityDialog::m_inputParams
std::vector< te::vp::InputParams > m_inputParams
A vector of input parameters.
Definition: IdentityDialog.h:127
te::vp::IdentityDialog
A dialog used to execute vector identity.
Definition: IdentityDialog.h:64
slots
#define slots
Definition: VirtualMachine.h:48
te::vp::IdentityDialog::m_inputSelectedLayer
te::map::AbstractLayerPtr m_inputSelectedLayer
Input layer selected.
Definition: IdentityDialog.h:124
te::vp::IdentityDialog::getWarnings
std::vector< std::string > getWarnings()
te::vp::IdentityDialog::setLayers
void setLayers(std::list< te::map::AbstractLayerPtr > layers)
Set the layer that can be used.
te::vp::IdentityDialog::DataStruct::DataStruct
DataStruct()
Definition: IdentityDialog.h:75
te::vp::IdentityDialog::m_ui
std::unique_ptr< Ui::IdentityDialogForm > m_ui
Definition: IdentityDialog.h:122
te::vp::IdentityDialog::onOkPushButtonClicked
void onOkPushButtonClicked()
te::vp::IdentityDialog::m_intersectionSelectedLayer
te::map::AbstractLayerPtr m_intersectionSelectedLayer
Identity layer selected.
Definition: IdentityDialog.h:125
te::da::DataSet
A dataset is the unit of information manipulated by the data access module of TerraLib.
Definition: DataSet.h:114
te::vp::IdentityDialog::getLayer
te::map::AbstractLayerPtr getLayer()
te::vp::IdentityDialog::IdentityDialog
IdentityDialog(QWidget *parent=0, Qt::WindowFlags f=0)
te::vp::IdentityDialog::getSelectedProperties
std::map< int, std::vector< std::string > > getSelectedProperties()
te::vp::IdentityDialog::onCancelPushButtonClicked
void onCancelPushButtonClicked()
te::vp::IdentityDialog::DataStruct::m_dataSetType
te::da::DataSetType * m_dataSetType
Definition: IdentityDialog.h:81
te::vp::IdentityDialog::onIntersectionLayerComboBoxChanged
void onIntersectionLayerComboBoxChanged(int index)
te::da::DataSetType
A class that models the description of a dataset.
Definition: DataSetType.h:73
te::vp::IdentityDialog::onInputLayerComboBoxChanged
void onInputLayerComboBoxChanged(int index)
te::vp::IdentityDialog::m_params
te::vp::AlgorithmParams * m_params
Algorithm parameters.
Definition: IdentityDialog.h:128
te::vp::IdentityDialog::DataStruct::m_dataSet
te::da::DataSet * m_dataSet
Definition: IdentityDialog.h:82