DataSetAdapterWidget.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/qt/widgets/property/DataSetAdapterWidget.h
22 
23  \brief A class used to define the DataSetAdapterWidget class.
24 */
25 
26 #ifndef __TERRALIB_QT_WIDGETS_PROPERTY_INTERNAL_DATASETADAPTERWIDGET_H
27 #define __TERRALIB_QT_WIDGETS_PROPERTY_INTERNAL_DATASETADAPTERWIDGET_H
28 
29 // TerraLib
30 #ifndef Q_MOC_RUN
31 #include "../../../dataaccess/datasource/DataSource.h"
32 #include "../../../dataaccess/datasource/DataSourceInfo.h"
33 #endif
34 #include "../Config.h"
35 
36 // Qt
37 #include <QWidget>
38 
39 //STL
40 #include <map>
41 
42 namespace Ui { class DataSetAdapterWidgetForm; }
43 
44 namespace te
45 {
46  namespace da
47  {
48  class DataSource;
49  class DataSet;
50  class DataSetType;
51  class DataSetTypeConverter;
52  }
53 
54  namespace qt
55  {
56  namespace widgets
57  {
58  /*!
59  \class DataSetAdapterWidget
60 
61  \brief A dialog for creating a data set adapter
62  */
63  class TEQTWIDGETSEXPORT DataSetAdapterWidget : public QWidget
64  {
65  Q_OBJECT
66 
67  public:
68 
69  DataSetAdapterWidget(QWidget* parent = 0, Qt::WindowFlags f = 0);
70 
72 
73  public:
74 
75  /*!
76  \brief Used to set the needed information to create a data set adapter.
77 
78  \param targetDS
79  \param sourceDataSet
80  */
81  void setAdapterParameters(te::da::DataSetType* sourceDataSetType, te::da::DataSetTypeConverter* converter, const te::da::DataSourceInfoPtr& targetDatasource);
82 
83  te::da::DataSetTypeConverter* getConverter();
84 
85 
86  public slots:
87 
88  void onAddToolButtonClicked();
89 
90  void onRemoveToolButtonClicked();
91 
92  void onEditToolButtonClicked();
93 
94  void onUpToolButtonClicked();
95 
96  void onDownToolButtonClicked();
97 
98  void onCellClicked(int row, int col);
99 
100 
101  protected:
102 
103  void buidTypeMap();
104 
105  void fillDataSetTable();
106 
107  private:
108 
109  std::auto_ptr<Ui::DataSetAdapterWidgetForm> m_ui;
110  std::map<int, std::string> m_typeMap;
114  };
115  } // end namespace widgets
116  } // end namespace qt
117 } // end namespace te
118 
119 #endif // __TERRALIB_QT_WIDGETS_PROPERTY_INTERNAL_DATASETADAPTERWIDGET_H
120 
std::map< int, std::string > m_typeMap
A dialog for creating a data set adapter.
boost::shared_ptr< DataSource > DataSourcePtr
Definition: DataSource.h:1438
A class that models the description of a dataset.
Definition: DataSetType.h:72
An converter for DataSetType.
URI C++ Library.
te::da::DataSetTypeConverter * m_dataSetConverter
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63
std::auto_ptr< Ui::DataSetAdapterWidgetForm > m_ui
boost::shared_ptr< DataSourceInfo > DataSourceInfoPtr