InputDataAccessItemWidget.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 src/terralib/vp/qt/InputDataAccessItemWidget.h
22  *
23  * \brief Implements a widget used to return a Data Access object.
24  */
25 
26 #ifndef __TERRALIB_VP_QT_INTERNAL_INPUTDATAACCESSITEMWIDGET_H
27 #define __TERRALIB_VP_QT_INTERNAL_INPUTDATAACCESSITEMWIDGET_H
28 
29 #include "../Config.h"
30 
31 // TerraLib Includes
32 #include "../../maptools/AbstractLayer.h"
33 
34 // STL Includes
35 #include <memory>
36 
37 // Qt Includes
38 #include <QWidget>
39 
40 namespace Ui { class InputDataAccessItemWidgetForm; }
41 
42 namespace te
43 {
44  namespace da
45  {
46  class DataAccessPtr;
47  }
48 
49  namespace qt
50  {
51  namespace widgets
52  {
53  class DataSetTypeFilter;
54  }
55  }
56 
57  namespace vp
58  {
59  namespace qt
60  {
61  /*!
62  \class InputDataAccessItemWidget
63 
64  \brief Implements a widget used to return a Data Access object.
65  */
66  class TEVPEXPORT InputDataAccessItemWidget : public QWidget
67  {
68  Q_OBJECT
69 
70  public:
71 
72  /*!
73  \brief Constructor.
74  */
75  InputDataAccessItemWidget(QWidget* parent = 0, Qt::WindowFlags f = 0);
76 
77  /*!
78  \brief Destructor.
79  */
81 
82  public:
83 
84  /*!
85  \brief Returns the internal widget
86 
87  \return Pointer to Qt Widget InputDataAccessItemWidgetForm
88  */
89  Ui::InputDataAccessItemWidgetForm* getForm() const;
90 
91  /*!
92  \brief Set the list of layers to be selected
93 
94  \param layers List of layers
95  */
96  void setLayerList(const std::list<te::map::AbstractLayerPtr>& layers);
97 
98  /*!
99  \brief Get DataAccess given the user defined parameters in the interface
100 
101  \return TerraLib DataAccess object
102  */
103  te::da::DataAccessPtr getDataAccess();
104 
105  protected slots:
106 
107  /*!
108  \brief Slot for layer selection
109 
110  \param index Index of combo box item selected
111  */
112  void onInputLayerComboBoxActivated(int index);
113 
114  void onConverterToolButtonClicked();
115 
116  private:
117 
118  std::unique_ptr<Ui::InputDataAccessItemWidgetForm> m_ui; //!< Pointer to Qt widget
119 
120  std::unique_ptr<te::qt::widgets::DataSetTypeFilter> m_dsTypeFiltertWidget; //!< Qt Component to filter dataset type
121  };
122  } // end namespace qt
123  } // end namespace qt
124 } // end namespace qt
125 
126 
127 #endif // __TERRALIB_VP_QT_INTERNAL_INPUTDATAACCESSITEMWIDGET_H
128 
#define TEVPEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:61
#define slots
std::unique_ptr< te::qt::widgets::DataSetTypeFilter > m_dsTypeFiltertWidget
Qt Component to filter dataset type.
TerraLib.
std::unique_ptr< Ui::InputDataAccessItemWidgetForm > m_ui
Pointer to Qt widget.
Implements a widget used to return a Data Access object.