DifferenceDialog.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/DifferenceDialog.h
22 
23  \brief Difference operation dialog.
24 */
25 
26 #ifndef __TERRALIB_VP_QT_INTERNAL_DIFFERENCEDIALOG_H
27 #define __TERRALIB_VP_QT_INTERNAL_DIFFERENCEDIALOG_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 <memory>
39 
40 // Qt
41 #include <QDialog>
42 
43 namespace Ui { class DifferenceDialogForm; }
44 
45 namespace te
46 {
47  namespace qt
48  {
49  namespace widgets
50  {
51  class DoubleListWidget;
52  }
53  }
54 
55  namespace vp
56  {
57  /*!
58  \class DifferenceDialog
59 
60  \brief A dialog used to execute vector difference.
61  */
62  class TEVPEXPORT DifferenceDialog : public QDialog
63  {
64  Q_OBJECT
65 
66  public:
67 
68  DifferenceDialog(QWidget* parent = 0, Qt::WindowFlags f = 0);
69 
71 
72  struct DataStruct
73  {
75  {
76  m_dataSetType = 0;
77  m_dataSet = 0;
78  }
79 
82  };
83 
84  /*!
85  \brief Set the layer that can be used
86 
87  \param layers List of AbstractLayerPtr
88  */
89  void setLayers(std::list<te::map::AbstractLayerPtr> layers);
90 
92 
93  protected:
94 
95  std::vector<std::string> getSelectedProperties();
96 
97  bool isCollection();
98 
100 
102 
104 
105  protected slots:
106 
108 
110 
112 
114 
116 
118 
119 
120 
121  private:
122 
123  std::unique_ptr<Ui::DifferenceDialogForm> m_ui;
124  std::list<te::map::AbstractLayerPtr> m_layers; //!< The vector layers in Layer Explorer.
126  te::map::AbstractLayerPtr m_differenceSelectedLayer; //!< Difference layer selected.
127 
128  std::vector<te::vp::InputParams> m_inputParams; //!< A vector of input parameters.
129  te::vp::AlgorithmParams* m_params; //!< Algorithm parameters.
130 
131  te::da::DataSourceInfoPtr m_outputDatasource; //!< DataSource information.
133 
134  bool m_toFile; //!< The result is in a file?
135 
136  std::unique_ptr<te::qt::widgets::DoubleListWidget> m_doubleListWidget;
137  };
138  } // end namespace vp
139 } // end namespace te
140 
141 #endif // __TERRALIB_VP_QT_INTERNAL_DIFFERENCEDIALOG_H
te::vp::DifferenceDialog::DataStruct
Definition: DifferenceDialog.h:73
te::vp::DifferenceDialog::getSelectedProperties
std::vector< std::string > getSelectedProperties()
te
TerraLib.
Definition: AddressGeocodingOp.h:52
te::vp::DifferenceDialog::onTargetDatasourceToolButtonPressed
void onTargetDatasourceToolButtonPressed()
te::vp::DifferenceDialog::DataStruct::m_dataSetType
te::da::DataSetType * m_dataSetType
Definition: DifferenceDialog.h:80
te::vp::DifferenceDialog::onCancelPushButtonClicked
void onCancelPushButtonClicked()
te::map::AbstractLayerPtr
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
Definition: AbstractLayer.h:626
te::vp::DifferenceDialog::updateInputLayerComboBox
void updateInputLayerComboBox()
te::da::DataSourceInfoPtr
boost::shared_ptr< DataSourceInfo > DataSourceInfoPtr
Definition: DataSourceInfo.h:107
te::vp::DifferenceDialog
A dialog used to execute vector difference.
Definition: DifferenceDialog.h:63
te::vp::DifferenceDialog::m_differenceSelectedLayer
te::map::AbstractLayerPtr m_differenceSelectedLayer
Difference layer selected.
Definition: DifferenceDialog.h:126
te::vp::AlgorithmParams
Definition: AlgorithmParams.h:52
te::vp::DifferenceDialog::updateDoubleListWidget
void updateDoubleListWidget()
te::vp::DifferenceDialog::setLayers
void setLayers(std::list< te::map::AbstractLayerPtr > layers)
Set the layer that can be used.
te::vp::DifferenceDialog::onTargetFileToolButtonPressed
void onTargetFileToolButtonPressed()
te::vp::DifferenceDialog::DataStruct::DataStruct
DataStruct()
Definition: DifferenceDialog.h:74
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::DifferenceDialog::m_toFile
bool m_toFile
The result is in a file?
Definition: DifferenceDialog.h:134
te::vp::DifferenceDialog::onOkPushButtonClicked
void onOkPushButtonClicked()
te::vp::DifferenceDialog::m_layerResult
te::map::AbstractLayerPtr m_layerResult
Generated Layer.
Definition: DifferenceDialog.h:132
te::vp::DifferenceDialog::m_inputSelectedLayer
te::map::AbstractLayerPtr m_inputSelectedLayer
Input layer selected.
Definition: DifferenceDialog.h:125
te::vp::DifferenceDialog::onDifferenceLayerComboBoxChanged
void onDifferenceLayerComboBoxChanged(int index)
slots
#define slots
Definition: VirtualMachine.h:48
te::vp::DifferenceDialog::DifferenceDialog
DifferenceDialog(QWidget *parent=0, Qt::WindowFlags f=0)
te::vp::DifferenceDialog::m_outputDatasource
te::da::DataSourceInfoPtr m_outputDatasource
DataSource information.
Definition: DifferenceDialog.h:131
te::vp::DifferenceDialog::updateDifferenceLayerComboBox
void updateDifferenceLayerComboBox()
te::vp::DifferenceDialog::~DifferenceDialog
~DifferenceDialog()
te::vp::DifferenceDialog::onInputLayerComboBoxChanged
void onInputLayerComboBoxChanged(int index)
te::vp::DifferenceDialog::isCollection
bool isCollection()
te::vp::DifferenceDialog::m_params
te::vp::AlgorithmParams * m_params
Algorithm parameters.
Definition: DifferenceDialog.h:129
te::vp::DifferenceDialog::getLayer
te::map::AbstractLayerPtr getLayer()
te::da::DataSet
A dataset is the unit of information manipulated by the data access module of TerraLib.
Definition: DataSet.h:114
te::da::DataSetType
A class that models the description of a dataset.
Definition: DataSetType.h:73
te::vp::DifferenceDialog::m_layers
std::list< te::map::AbstractLayerPtr > m_layers
The vector layers in Layer Explorer.
Definition: DifferenceDialog.h:124
te::vp::DifferenceDialog::m_ui
std::unique_ptr< Ui::DifferenceDialogForm > m_ui
Definition: DifferenceDialog.h:123
te::vp::DifferenceDialog::m_doubleListWidget
std::unique_ptr< te::qt::widgets::DoubleListWidget > m_doubleListWidget
Definition: DifferenceDialog.h:136
te::vp::DifferenceDialog::DataStruct::m_dataSet
te::da::DataSet * m_dataSet
Definition: DifferenceDialog.h:81
te::vp::DifferenceDialog::m_inputParams
std::vector< te::vp::InputParams > m_inputParams
A vector of input parameters.
Definition: DifferenceDialog.h:128