ConfigInputAddressDialog.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/ConfigInputAddressDialog.h
22 
23  \brief A dialog to import table with address to geocoding operation
24 */
25 
26 #ifndef __TERRALIB_ADDRESSGEOCODING_INTERNAL_CONFIGINPUTADDRESSDIALOG_H
27 #define __TERRALIB_ADDRESSGEOCODING_INTERNAL_CONFIGINPUTADDRESSDIALOG_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 <map>
38 #include <memory>
39 
40 // Qt
41 #include <QDialog>
42 #include <QSettings>
43 
44 namespace Ui { class ConfigInputAddressDialogForm; }
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  ConfigInputAddressDialog(QWidget* parent = 0, Qt::WindowFlags f = 0);
60 
62 
63  te::da::DataSourcePtr getDataSource();
64 
65  void setDataSource(te::da::DataSourcePtr dataSource);
66 
67  std::string getAddressFileName();
68 
69  std::string getStreetType();
70 
71  void setStreetType(std::string streetType);
72 
73  std::string getStreetTitle();
74 
75  void setStreetTitle(std::string streetTitle);
76 
77  std::string getStreetName();
78 
79  void setStreetName(std::string streetName);
80 
81  std::string getStreetNumber();
82 
83  void setStreetNumber(std::string streetNumber);
84 
85  std::string getStreetNeighborhood();
86 
87  void setStreetNeighborhood(std::string streetNeighborhood);
88 
89  std::string getStreetPostalCode();
90 
91  void setStreetPostalCode(std::string streetPostalCode);
92 
93  protected slots:
94 
95  void onHelpPushButtonClicked();
96 
97  void onOkPushButtonClicked();
98 
99  void onCancelPushButtonClicked();
100 
101  private:
102 
103  void AddAddressConfigToSettings(std::map<std::string, std::string> addressConfig);
104 
105  void AddAddressConfigItens(std::map<std::string, std::string> addressConfig, QSettings& sett);
106 
107  void AddAddressConfigToSettings(std::string filePath,
108  std::string streetType,
109  std::string streetTitle,
110  std::string streetName,
111  std::string number,
112  std::string neighborhood,
113  std::string postalCode);
114 
115  void GetAddressConfigToSettings(std::string& filePath,
116  std::string& streetType,
117  std::string& streetTitle,
118  std::string& streetName,
119  std::string& number,
120  std::string& neighborhood,
121  std::string& postalCode);
122 
123  void RemoveAddressConfigFromSettings(const QString& path, const QString& typeFile);
124 
125  std::auto_ptr<Ui::ConfigInputAddressDialogForm> m_ui;
127  std::auto_ptr<te::da::DataSet> m_dataSet;
128  std::vector<te::dt::Property*> m_properties; //!< Properties related to the selected Layer
129  };
130  } // end namespace addressgeocoding
131 } // end namespace te
132 
133 #endif // __TERRALIB_ADDRESSGEOCODING_INTERNAL_CONFIGINPUTADDRESSDIALOG_H
std::auto_ptr< Ui::ConfigInputAddressDialogForm > m_ui
boost::shared_ptr< DataSource > DataSourcePtr
Definition: DataSource.h:1438
URI C++ Library.
#define TEADDRESSGEOCODINGEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:61
std::vector< te::dt::Property * > m_properties
Properties related to the selected Layer.