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 
84 
85 
86  public slots:
87 
89 
91 
93 
95 
97 
98  void onCellClicked(int row, int col);
99 
100  signals:
101 
103 
104 
105  protected:
106 
107  void buidTypeMap();
108 
110 
111  private:
112 
113  std::unique_ptr<Ui::DataSetAdapterWidgetForm> m_ui;
114  std::map<int, std::string> m_typeMap;
118  };
119  } // end namespace widgets
120  } // end namespace qt
121 } // end namespace te
122 
123 #endif // __TERRALIB_QT_WIDGETS_PROPERTY_INTERNAL_DATASETADAPTERWIDGET_H
124 
te::qt::widgets::DataSetAdapterWidget::onAddToolButtonClicked
void onAddToolButtonClicked()
te::qt::widgets::DataSetAdapterWidget::onDownToolButtonClicked
void onDownToolButtonClicked()
te
TerraLib.
Definition: AddressGeocodingOp.h:52
te::qt::widgets::DataSetAdapterWidget::dataSetAdapterChanged
void dataSetAdapterChanged()
te::da::DataSourceInfoPtr
boost::shared_ptr< DataSourceInfo > DataSourceInfoPtr
Definition: DataSourceInfo.h:107
te::qt::widgets::DataSetAdapterWidget::DataSetAdapterWidget
DataSetAdapterWidget(QWidget *parent=0, Qt::WindowFlags f=0)
TEQTWIDGETSEXPORT
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63
te::qt::widgets::DataSetAdapterWidget::onRemoveToolButtonClicked
void onRemoveToolButtonClicked()
te::qt::widgets::DataSetAdapterWidget::onUpToolButtonClicked
void onUpToolButtonClicked()
Ui
Definition: ConfigInputAddressDialog.h:44
te::qt::widgets::DataSetAdapterWidget::m_ui
std::unique_ptr< Ui::DataSetAdapterWidgetForm > m_ui
Definition: DataSetAdapterWidget.h:113
te::qt::widgets::DataSetAdapterWidget::fillDataSetTable
void fillDataSetTable()
te::qt::widgets::DataSetAdapterWidget::onCellClicked
void onCellClicked(int row, int col)
slots
#define slots
Definition: VirtualMachine.h:48
te::qt::widgets::DataSetAdapterWidget::getConverter
te::da::DataSetTypeConverter * getConverter()
te::qt::widgets::DataSetAdapterWidget::m_sourceDataSetType
te::da::DataSetType * m_sourceDataSetType
Definition: DataSetAdapterWidget.h:116
te::qt::widgets::DataSetAdapterWidget::m_targetDataSource
te::da::DataSourcePtr m_targetDataSource
Definition: DataSetAdapterWidget.h:115
te::qt::widgets::DataSetAdapterWidget::setAdapterParameters
void setAdapterParameters(te::da::DataSetType *sourceDataSetType, te::da::DataSetTypeConverter *converter, const te::da::DataSourceInfoPtr &targetDatasource)
Used to set the needed information to create a data set adapter.
te::da::DataSourcePtr
boost::shared_ptr< DataSource > DataSourcePtr
Definition: DataSource.h:1449
te::qt::widgets::DataSetAdapterWidget::m_dataSetConverter
te::da::DataSetTypeConverter * m_dataSetConverter
Definition: DataSetAdapterWidget.h:117
te::qt::widgets::DataSetAdapterWidget
A dialog for creating a data set adapter.
Definition: DataSetAdapterWidget.h:64
te::da::DataSetType
A class that models the description of a dataset.
Definition: DataSetType.h:73
te::qt::widgets::DataSetAdapterWidget::buidTypeMap
void buidTypeMap()
te::qt::widgets::DataSetAdapterWidget::~DataSetAdapterWidget
~DataSetAdapterWidget()
te::da::DataSetTypeConverter
An converter for DataSetType.
Definition: DataSetTypeConverter.h:60
te::qt::widgets::DataSetAdapterWidget::onEditToolButtonClicked
void onEditToolButtonClicked()
te::qt::widgets::DataSetAdapterWidget::m_typeMap
std::map< int, std::string > m_typeMap
Definition: DataSetAdapterWidget.h:114