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 #ifndef Q_MOC_RUN
31 #include "../../../dataaccess/dataset/DataSetType.h"
32 #include "../../../dataaccess/datasource/DataSourceInfo.h"
33 #endif
34 #include "../Config.h"
35 
36 // STL
37 #include <map>
38 #include <memory>
39 
40 // Qt
41 #include <QWizardPage>
42 
43 // Forward declaration
44 namespace Ui { class DataSetOptionsWizardPageForm; }
45 
46 class QListWidgetItem;
47 
48 namespace te
49 {
50  namespace da { class DataSetTypeConverter; }
51  namespace qt
52  {
53  namespace widgets
54  {
55  class ConstraintsIndexesListWidget;
56  class DataSetAdapterWidget;
57 
58  class TEQTWIDGETSEXPORT DataSetOptionsWizardPage : public QWizardPage
59  {
60  Q_OBJECT
61 
62  public:
63 
64  DataSetOptionsWizardPage(QWidget* parent = 0);
65 
67 
68  void set(const std::list<te::da::DataSetTypePtr>& datasets,
69  const te::da::DataSourceInfoPtr& datasource,
70  const te::da::DataSourceInfoPtr& targetDatasource);
71 
72  const std::map<te::da::DataSetTypePtr, te::da::DataSetTypeConverter*>& getDatasets() const;
73 
74  void showSimpleMode(const bool& mode);
75 
76  public slots:
77 
78  void applyChanges();
79 
80  protected slots:
81 
82  void sridInputSearchToolButtonPressed();
83 
84  void sridOutputSearchToolButtonPressed();
85 
86  void datasetPressed(QListWidgetItem* item);
87 
88  //void checkModificationsOnFocusChange(QWidget* old, QWidget* now);
89 
90  protected:
91 
92  te::da::DataSetTypePtr getSelectedDataSet() const;
93 
94  private:
95 
96  void clearForm();
97 
98  void setControlsEnabled(bool enabled);
99 
100  private:
101 
102  struct FindByName
103  {
104  std::string m_name;
105 
106  FindByName(const QString& name);
107 
108  bool operator()(const te::da::DataSetTypePtr& dataset) const;
109  };
110 
111  private:
112 
113  std::auto_ptr<Ui::DataSetOptionsWizardPageForm> m_ui;
114  std::auto_ptr<te::qt::widgets::ConstraintsIndexesListWidget> m_constraintWidget;
115  std::auto_ptr<te::qt::widgets::DataSetAdapterWidget> m_dataSetAdapterWidget;
116  std::map<te::da::DataSetTypePtr, te::da::DataSetTypeConverter*> m_datasets;
119  };
120 
121  } // end namespace widgets
122  } // end namespace qt
123 } // end namespace te
124 
125 #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