All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TL4ConverterWizard.h
Go to the documentation of this file.
1 /* Copyright (C) 2011-2012 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/qt/plugins/terralib5/TL4ConverterWizard.h
22 
23  \brief A wizard for guiding the conversion of a TerraLib 4.x database to a OGC SFS compliant format or any other format known by OGR and GDAL.
24 */
25 
26 #ifndef __TERRALIB_PLUGINS_TERRALIB4_INTERNAL_TL4CONVERTERWIZARD_H
27 #define __TERRALIB_PLUGINS_TERRALIB4_INTERNAL_TL4CONVERTERWIZARD_H
28 
29 // TerraLib
30 #include "../../../../dataaccess/datasource/DataSourceInfo.h"
31 #include "Config.h"
32 
33 // STL
34 #include <map>
35 #include <memory>
36 #include <string>
37 
38 // Qt
39 #include <QtGui/QTableWidget>
40 #include <QtGui/QWizard>
41 #include <QtGui/QWizardPage>
42 
43 // Forward declaration
44 namespace Ui { class TL4ConverterWizardForm; }
45 
46 namespace te
47 {
48  namespace da { class DataSource; }
49 
50  namespace qt
51  {
52  namespace widgets{class DataSourceSelectorWizardPage;}
53 
54  namespace plugins
55  {
56  namespace terralib4
57  {
58  class TL4ConnectorWizardPage;
59  class TL4LayerSelectionWizardPage;
60  class TL4RasterFolderSelectionWizardPage;
61  class TL4FinalPageWizardPage;
62 
64  {
65  Q_OBJECT
66 
67  public:
68 
69  TL4ConverterWizard(QWidget* parent = 0, Qt::WindowFlags f = 0);
70 
72 
73  int nextId() const;
74 
75  bool validateCurrentPage();
76 
77  private:
78 
79  bool validTerraLib4Connection();
80 
81  bool validLayerSelection();
82 
83  bool validLayerNames();
84 
85  std::string getOriginalName(const std::string& targetName);
86 
87  protected slots:
88 
89  void back();
90 
91  void next();
92 
93  void commit();
94 
95  void finish();
96 
97  void help();
98 
99  private:
100 
101  enum
102  {
108  PAGE_FINALPAGE
109  };
110 
114 
115  std::string m_rasterFolderPath;
116 
117  std::auto_ptr<te::da::DataSource> m_tl4Database;
118 
120 
121  std::auto_ptr<Ui::TL4ConverterWizardForm> m_ui;
122  std::auto_ptr<TL4ConnectorWizardPage> m_connectorPage;
123  std::auto_ptr<te::qt::widgets::DataSourceSelectorWizardPage>m_datasourceSelectorPage;
124  std::auto_ptr<TL4LayerSelectionWizardPage> m_layerSelectionPage;
125  std::auto_ptr<TL4RasterFolderSelectionWizardPage> m_rasterFolderSelectionPage;
126  std::auto_ptr<QWizardPage> m_resolveNamePage;
127  std::auto_ptr<TL4FinalPageWizardPage> m_finalPage;
128 
129  std::auto_ptr<QTableWidget> m_resolveNameTableWidget;
130  };
131  } // end namespace terralib4
132  } // end namespace plugins
133  } // end namespace qt
134 } // end namespace te
135 
136 #endif // __TERRALIB_PLUGINS_TERRALIB4_INTERNAL_TL4CONVERTERWIZARD_H
std::auto_ptr< te::qt::widgets::DataSourceSelectorWizardPage > m_datasourceSelectorPage
std::auto_ptr< TL4LayerSelectionWizardPage > m_layerSelectionPage
std::auto_ptr< te::da::DataSource > m_tl4Database
std::auto_ptr< TL4RasterFolderSelectionWizardPage > m_rasterFolderSelectionPage
std::auto_ptr< QTableWidget > m_resolveNameTableWidget
std::auto_ptr< Ui::TL4ConverterWizardForm > m_ui
std::auto_ptr< TL4FinalPageWizardPage > m_finalPage
#define TEQTPLUGINTERRALIB4EXPORT
You can use this macro in order to export/import classes and functions from all plug-ins files...
Definition: Config.h:74
boost::shared_ptr< DataSourceInfo > DataSourceInfoPtr
std::auto_ptr< TL4ConnectorWizardPage > m_connectorPage