All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 #include "../../../dataaccess/datasource/DataSource.h"
31 #include "../../../dataaccess/datasource/DataSourceInfo.h"
32 #include "../Config.h"
33 
34 // Qt
35 #include <QWidget>
36 
37 //STL
38 #include <map>
39 
40 namespace Ui { class DataSetAdapterWidgetForm; }
41 
42 namespace te
43 {
44  namespace da
45  {
46  class DataSource;
47  class DataSet;
48  class DataSetType;
49  class DataSetTypeConverter;
50  }
51 
52  namespace qt
53  {
54  namespace widgets
55  {
56  /*!
57  \class DataSetAdapterWidget
58 
59  \brief A dialog for creating a data set adapter
60  */
61  class TEQTWIDGETSEXPORT DataSetAdapterWidget : public QWidget
62  {
63  Q_OBJECT
64 
65  public:
66 
67  DataSetAdapterWidget(QWidget* parent = 0, Qt::WindowFlags f = 0);
68 
70 
71  public:
72 
73  /*!
74  \brief Used to set the needed information to create a data set adapter.
75 
76  \param targetDS
77  \param sourceDataSet
78  */
79  void setAdapterParameters(te::da::DataSetType* sourceDataSetType, te::da::DataSetTypeConverter* converter, const te::da::DataSourceInfoPtr& targetDatasource);
80 
81  te::da::DataSetTypeConverter* getConverter();
82 
83 
84  public slots:
85 
86  void onAddToolButtonClicked();
87 
88  void onRemoveToolButtonClicked();
89 
90  void onEditToolButtonClicked();
91 
92  void onUpToolButtonClicked();
93 
94  void onDownToolButtonClicked();
95 
96  void onCellClicked(int row, int col);
97 
98 
99  protected:
100 
101  void buidTypeMap();
102 
103  void fillDataSetTable();
104 
105  private:
106 
107  std::auto_ptr<Ui::DataSetAdapterWidgetForm> m_ui;
108  std::map<int, std::string> m_typeMap;
112  };
113  } // end namespace widgets
114  } // end namespace qt
115 } // end namespace te
116 
117 #endif // __TERRALIB_QT_WIDGETS_PROPERTY_INTERNAL_DATASETADAPTERWIDGET_H
118 
std::map< int, std::string > m_typeMap
A dialog for creating a data set adapter.
boost::shared_ptr< DataSource > DataSourcePtr
Definition: DataSource.h:1435
A class that models the description of a dataset.
Definition: DataSetType.h:72
An converter for DataSetType.
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:66
std::auto_ptr< Ui::DataSetAdapterWidgetForm > m_ui
boost::shared_ptr< DataSourceInfo > DataSourceInfoPtr
void buidTypeMap(std::map< int, std::string > &typeMap)