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  */
104 
105  //!< Configures the widget to allow the filter of properties
106  void setFilterPropertiesEnabled(bool enabled);
107 
108  protected slots:
109 
110  /*!
111  \brief Slot for layer selection
112 
113  \param index Index of combo box item selected
114  */
116 
118 
119  signals:
120 
122 
123  private:
124 
125  std::unique_ptr<Ui::InputDataAccessItemWidgetForm> m_ui; //!< Pointer to Qt widget
126 
127  std::unique_ptr<te::qt::widgets::DataSetTypeFilter> m_dsTypeFiltertWidget; //!< Qt Component to filter dataset type
128  };
129  } // end namespace qt
130  } // end namespace qt
131 } // end namespace qt
132 
133 
134 #endif // __TERRALIB_VP_QT_INTERNAL_INPUTDATAACCESSITEMWIDGET_H
135 
Implements a widget used to return a Data Access object.
void onInputLayerComboBoxActivated(int index)
Slot for layer selection.
Ui::InputDataAccessItemWidgetForm * getForm() const
Returns the internal widget.
InputDataAccessItemWidget(QWidget *parent=0, Qt::WindowFlags f=0)
Constructor.
void setFilterPropertiesEnabled(bool enabled)
te::da::DataAccessPtr getDataAccess()
Get DataAccess given the user defined parameters in the interface.
std::unique_ptr< te::qt::widgets::DataSetTypeFilter > m_dsTypeFiltertWidget
Qt Component to filter dataset type.
std::unique_ptr< Ui::InputDataAccessItemWidgetForm > m_ui
Pointer to Qt widget.
void setLayerList(const std::list< te::map::AbstractLayerPtr > &layers)
Set the list of layers to be selected.
TerraLib.
#define slots
#define TEVPEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:61