Loading...
Searching...
No Matches
MergeDialog.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/MergeDialog.h
22
23 \brief A dialog merge operation
24*/
25
26#ifndef __TERRALIB_VP_INTERNAL_MERGEDIALOG_H
27#define __TERRALIB_VP_INTERNAL_MERGEDIALOG_H
28
29// TerraLib
30#ifndef Q_MOC_RUN
31#include "../../dataaccess/datasource/DataSourceInfo.h"
32#include "../../maptools/AbstractLayer.h"
33#endif
34#include "../Config.h"
35
36// STL
37#include <memory>
38
39// Qt
40#include <QDialog>
41
42namespace Ui { class MergeDialogForm; }
43
44// Forward declarations
45class QComboBox;
46
47namespace te
48{
49 namespace dt { class Property; }
50 namespace vp
51 {
52// Forward declarations
53 class LayerTreeModel;
54
55 class TEVPEXPORT MergeDialog : public QDialog
56 {
57 Q_OBJECT
58
59 public:
60
61 MergeDialog(QWidget* parent = 0, Qt::WindowFlags f = 0);
62
64
65 /*!
66 \brief Set the layer that can be used
67
68 \param layers List of AbstractLayerPtr
69 \param selectedLayer Selected AbstractLayerPtr
70 */
71 void setLayers(std::list<te::map::AbstractLayerPtr> layers);
72
73 /*!
74 \brief Get the generated layer.
75
76 \return the generated layer.
77 */
79
80 private:
81
83
85
87
88 QComboBox* getPossibleAttributesComboBox(te::dt::Property* mainProp, std::vector<te::dt::Property*> props);
89
90 QComboBox* getAllAttributesComboBox(std::vector<te::dt::Property*> props);
91
92 std::vector<std::pair<std::string, std::string> > getTablePropertiesNames();
93
94 protected slots:
95
97
99
101
103
105
107
109
110 private:
111
112 std::unique_ptr<Ui::MergeDialogForm> m_ui;
113
114 te::da::DataSourceInfoPtr m_outputDatasource; //!< DataSource information.
115 std::list<te::map::AbstractLayerPtr> m_layers; //!< List of layers.
118
121 };
122 } // end namespace vp
123} // end namespace te
124
125#endif // __TERRALIB_VP_INTERNAL_MERGEDIALOG_H
It models a property definition.
Definition: Property.h:60
void onCancelPushButtonClicked()
void setLayers(std::list< te::map::AbstractLayerPtr > layers)
Set the layer that can be used.
void onOutputGroupBoxToggled(bool on)
void onTargetDatasourceToolButtonPressed()
void updateOriginLayerComboBox()
QComboBox * getAllAttributesComboBox(std::vector< te::dt::Property * > props)
void onOriginLayerComboBoxChanged(int index)
MergeDialog(QWidget *parent=0, Qt::WindowFlags f=0)
te::da::DataSourceInfoPtr m_outputDatasource
DataSource information.
Definition: MergeDialog.h:114
QComboBox * getPossibleAttributesComboBox(te::dt::Property *mainProp, std::vector< te::dt::Property * > props)
te::map::AbstractLayerPtr m_targetSelectedLayer
Target layer selected.
Definition: MergeDialog.h:119
void onOkPushButtonClicked()
std::unique_ptr< Ui::MergeDialogForm > m_ui
Definition: MergeDialog.h:112
std::vector< std::pair< std::string, std::string > > getTablePropertiesNames()
std::list< te::map::AbstractLayerPtr > m_layers
List of layers.
Definition: MergeDialog.h:115
void onTargetLayerComboBoxChanged(int index)
te::map::AbstractLayerPtr m_outputLayer
Generated Layer.
Definition: MergeDialog.h:116
void updateAttrTableWidget()
void onTargetFileToolButtonPressed()
void updateTargetLayerComboBox()
te::map::AbstractLayerPtr getLayer()
Get the generated layer.
te::map::AbstractLayerPtr m_originSelectedLayer
Second layer selected.
Definition: MergeDialog.h:120
boost::shared_ptr< DataSourceInfo > DataSourceInfoPtr
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
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