MainWindowDialog.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/addressgeocoding/qt/MainwindowDialog.h
22 
23  \brief A main window to address geocoding operation
24 */
25 
26 #ifndef __TERRALIB_ADDRESSGEOCODING_INTERNAL_MAINWINDOWDIALOG_H
27 #define __TERRALIB_ADDRESSGEOCODING_INTERNAL_MAINWINDOWDIALOG_H
28 
29 // TerraLib
30 #include "../../dataaccess/datasource/DataSource.h"
31 #include "../../dataaccess/datasource/DataSourceInfo.h"
32 #include "../../datatype/Property.h"
33 #include "../../maptools/AbstractLayer.h"
34 #include "../Config.h"
35 
36 // STL
37 #include <list>
38 #include <map>
39 #include <memory>
40 
41 // Qt
42 #include <QDialog>
43 
44 namespace Ui { class MainWindowDialogForm; }
45 
46 // Forward declarations
47 class QModelIndex;
48 
49 namespace te
50 {
51  namespace addressgeocoding
52  {
54  {
55  Q_OBJECT
56 
57  public:
58 
59  MainWindowDialog(QWidget* parent = 0, Qt::WindowFlags f = 0);
60 
62 
63  /*!
64  \brief Set the layer that can be used
65 
66  \param layers List of AbstractLayerPtr
67  */
68  void setLayers(std::list<te::map::AbstractLayerPtr> layers);
69 
70  /*!
71  \brief Get the generated layer.
72 
73  \return the generated layer.
74  */
76 
77  protected slots:
78 
79  void onLayerComboBoxChanged(int index);
80 
82 
83  void onFinalLeftComboBoxChanged(int index);
84 
86 
87  void onFinalRightComboBoxChanged(int index);
88 
90 
91  void onAddressComboBoxChanged(int index);
92 
94 
96 
98 
100 
102 
104 
106 
107  private:
108 
109  void GetAddressFilePathToSettings(std::map<std::string, std::vector<std::string> >& mapFields);
110 
111  void GetAddressDataSource(std::string fileName);
112 
113  std::unique_ptr<Ui::MainWindowDialogForm> m_ui;
114  std::list<te::map::AbstractLayerPtr> m_layers; //!< List of layers.
117  te::map::AbstractLayerPtr m_newColumnLayer; //!< Layer used for tsVector column.
118  std::vector<te::dt::Property*> m_properties; //!< Properties related to the selected Layer
119  te::da::DataSourceInfoPtr m_outputDatasource; //!< DataSource information.
121 
122  std::string m_initialLeft;
123  std::string m_finalLeft;
124  std::string m_initialRight;
125  std::string m_finalRight;
126 
128  std::map<std::string, std::vector<std::string> > m_mapFields;
129  std::string m_addressFile;
130  std::vector<std::string> m_associatedProps;
131  std::string m_streetNumber;
132 
133  bool m_toFile;
134 
135  };
136  } // end namespace addressgeocoding
137 } // end namespace te
138 
139 #endif // __TERRALIB_ADDRESSGEOCODING_INTERNAL_MAINWINDOWDIALOG_H
te::addressgeocoding::MainWindowDialog::m_addressFile
std::string m_addressFile
Definition: MainWindowDialog.h:129
te::addressgeocoding::MainWindowDialog::onOkPushButtonClicked
void onOkPushButtonClicked()
te
TerraLib.
Definition: AddressGeocodingOp.h:52
te::addressgeocoding::MainWindowDialog::m_ui
std::unique_ptr< Ui::MainWindowDialogForm > m_ui
Definition: MainWindowDialog.h:113
te::addressgeocoding::MainWindowDialog::onCancelPushButtonClicked
void onCancelPushButtonClicked()
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::addressgeocoding::MainWindowDialog::m_selectedLayer
te::map::AbstractLayerPtr m_selectedLayer
List of layers.
Definition: MainWindowDialog.h:115
te::addressgeocoding::MainWindowDialog::onLayerComboBoxChanged
void onLayerComboBoxChanged(int index)
te::addressgeocoding::MainWindowDialog::onInitialLeftComboBoxChanged
void onInitialLeftComboBoxChanged(int index)
te::addressgeocoding::MainWindowDialog::setLayers
void setLayers(std::list< te::map::AbstractLayerPtr > layers)
Set the layer that can be used.
te::addressgeocoding::MainWindowDialog::GetAddressDataSource
void GetAddressDataSource(std::string fileName)
te::addressgeocoding::MainWindowDialog::m_streetNumber
std::string m_streetNumber
Definition: MainWindowDialog.h:131
te::addressgeocoding::MainWindowDialog::onTargetFileAddressToolButtonPressed
void onTargetFileAddressToolButtonPressed()
te::addressgeocoding::MainWindowDialog::m_associatedProps
std::vector< std::string > m_associatedProps
Definition: MainWindowDialog.h:130
te::addressgeocoding::MainWindowDialog::m_toFile
bool m_toFile
Definition: MainWindowDialog.h:133
te::addressgeocoding::MainWindowDialog::m_properties
std::vector< te::dt::Property * > m_properties
Properties related to the selected Layer.
Definition: MainWindowDialog.h:118
te::addressgeocoding::MainWindowDialog::m_addressDataSource
te::da::DataSourcePtr m_addressDataSource
Definition: MainWindowDialog.h:127
te::addressgeocoding::MainWindowDialog::onInitialRightComboBoxChanged
void onInitialRightComboBoxChanged(int index)
te::addressgeocoding::MainWindowDialog::MainWindowDialog
MainWindowDialog(QWidget *parent=0, Qt::WindowFlags f=0)
te::addressgeocoding::MainWindowDialog::m_outputDatasource
te::da::DataSourceInfoPtr m_outputDatasource
DataSource information.
Definition: MainWindowDialog.h:119
te::addressgeocoding::MainWindowDialog::onEditAddressToolButtonPressed
void onEditAddressToolButtonPressed()
Ui
Definition: ConfigInputAddressDialog.h:44
te::addressgeocoding::MainWindowDialog::onTargetFileToolButtonPressed
void onTargetFileToolButtonPressed()
te::addressgeocoding::MainWindowDialog::GetAddressFilePathToSettings
void GetAddressFilePathToSettings(std::map< std::string, std::vector< std::string > > &mapFields)
te::addressgeocoding::MainWindowDialog::m_finalRight
std::string m_finalRight
Definition: MainWindowDialog.h:125
te::addressgeocoding::MainWindowDialog::m_newColumnLayer
te::map::AbstractLayerPtr m_newColumnLayer
Layer used for tsVector column.
Definition: MainWindowDialog.h:117
slots
#define slots
Definition: VirtualMachine.h:48
te::addressgeocoding::MainWindowDialog
Definition: MainWindowDialog.h:54
te::addressgeocoding::MainWindowDialog::m_resultLayer
te::map::AbstractLayerPtr m_resultLayer
Generated Layer.
Definition: MainWindowDialog.h:120
te::addressgeocoding::MainWindowDialog::~MainWindowDialog
~MainWindowDialog()
te::addressgeocoding::MainWindowDialog::onFinalRightComboBoxChanged
void onFinalRightComboBoxChanged(int index)
te::addressgeocoding::MainWindowDialog::onAddressComboBoxChanged
void onAddressComboBoxChanged(int index)
te::addressgeocoding::MainWindowDialog::onTargetDatasourceToolButtonPressed
void onTargetDatasourceToolButtonPressed()
te::addressgeocoding::MainWindowDialog::m_layers
std::list< te::map::AbstractLayerPtr > m_layers
List of layers.
Definition: MainWindowDialog.h:114
te::addressgeocoding::MainWindowDialog::getLayer
te::map::AbstractLayerPtr getLayer()
Get the generated layer.
te::addressgeocoding::MainWindowDialog::m_initialLeft
std::string m_initialLeft
Definition: MainWindowDialog.h:122
te::da::DataSourcePtr
boost::shared_ptr< DataSource > DataSourcePtr
Definition: DataSource.h:1449
TEADDRESSGEOCODINGEXPORT
#define TEADDRESSGEOCODINGEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:61
te::addressgeocoding::MainWindowDialog::onRemoveAddressToolButtonPressed
void onRemoveAddressToolButtonPressed()
te::addressgeocoding::MainWindowDialog::onConfigureLayerClicked
void onConfigureLayerClicked()
te::addressgeocoding::MainWindowDialog::m_mapFields
std::map< std::string, std::vector< std::string > > m_mapFields
Definition: MainWindowDialog.h:128
te::addressgeocoding::MainWindowDialog::m_initialRight
std::string m_initialRight
Definition: MainWindowDialog.h:124
te::addressgeocoding::MainWindowDialog::m_finalLeft
std::string m_finalLeft
Definition: MainWindowDialog.h:123
te::addressgeocoding::MainWindowDialog::onFinalLeftComboBoxChanged
void onFinalLeftComboBoxChanged(int index)
te::addressgeocoding::MainWindowDialog::m_layerDataSource
te::da::DataSourcePtr m_layerDataSource
Definition: MainWindowDialog.h:116