DataSetOptionsWizardPage.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/plugins/exchanger/DataSetOptionsWizardPage.h
22 
23  \brief A Qt dialog for ....
24 */
25 
26 #ifndef __TERRALIB_PLUGINS_EXCHANGER_INTERNAL_DATASETOPTIONSWIZARDPAGE_H
27 #define __TERRALIB_PLUGINS_EXCHANGER_INTERNAL_DATASETOPTIONSWIZARDPAGE_H
28 
29 // TerraLib
30 #include "../../../dataaccess/dataset/DataSetType.h"
31 #include "../../../dataaccess/datasource/DataSourceInfo.h"
32 #include "../Config.h"
33 
34 // STL
35 #include <map>
36 #include <memory>
37 
38 // Qt
39 #include <QWizardPage>
40 
41 // Forward declaration
42 namespace Ui { class DataSetOptionsWizardPageForm; }
43 
44 class QListWidgetItem;
45 
46 namespace te
47 {
48  namespace da { class DataSetTypeConverter; }
49  namespace qt
50  {
51  namespace widgets
52  {
53  class ConstraintsIndexesListWidget;
54  class DataSetAdapterWidget;
55 
56  class TEQTWIDGETSEXPORT DataSetOptionsWizardPage : public QWizardPage
57  {
58  Q_OBJECT
59 
60  public:
61 
62  DataSetOptionsWizardPage(QWidget* parent = 0);
63 
65 
66  void set(const std::list<te::da::DataSetTypePtr>& datasets,
67  const te::da::DataSourceInfoPtr& datasource,
68  const te::da::DataSourceInfoPtr& targetDatasource);
69 
70  const std::map<te::da::DataSetTypePtr, te::da::DataSetTypeConverter*>& getDatasets() const;
71 
72  void showSimpleMode(const bool& mode);
73 
74  public slots:
75 
76  void applyChanges();
77 
78  protected slots:
79 
80  void sridInputSearchToolButtonPressed();
81 
82  void sridOutputSearchToolButtonPressed();
83 
84  void datasetPressed(QListWidgetItem* item);
85 
86  //void checkModificationsOnFocusChange(QWidget* old, QWidget* now);
87 
88  protected:
89 
90  te::da::DataSetTypePtr getSelectedDataSet() const;
91 
92  private:
93 
94  void clearForm();
95 
96  void setControlsEnabled(bool enabled);
97 
98  private:
99 
100  struct FindByName
101  {
102  std::string m_name;
103 
104  FindByName(const QString& name);
105 
106  bool operator()(const te::da::DataSetTypePtr& dataset) const;
107  };
108 
109  private:
110 
111  std::auto_ptr<Ui::DataSetOptionsWizardPageForm> m_ui;
112  std::auto_ptr<te::qt::widgets::ConstraintsIndexesListWidget> m_constraintWidget;
113  std::auto_ptr<te::qt::widgets::DataSetAdapterWidget> m_dataSetAdapterWidget;
114  std::map<te::da::DataSetTypePtr, te::da::DataSetTypeConverter*> m_datasets;
117  };
118 
119  } // end namespace widgets
120  } // end namespace qt
121 } // end namespace te
122 
123 #endif // __TERRALIB_PLUGINS_EXCHANGER_INTERNAL_DATASETOPTIONSWIZARDPAGE_H
boost::shared_ptr< DataSetType > DataSetTypePtr
Definition: DataSetType.h:653
std::map< te::da::DataSetTypePtr, te::da::DataSetTypeConverter * > m_datasets
std::auto_ptr< Ui::DataSetOptionsWizardPageForm > m_ui
URI C++ Library.
std::auto_ptr< te::qt::widgets::ConstraintsIndexesListWidget > m_constraintWidget
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63
boost::shared_ptr< DataSourceInfo > DataSourceInfoPtr
std::auto_ptr< te::qt::widgets::DataSetAdapterWidget > m_dataSetAdapterWidget