InputDataAccessWidget.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/InputDataAccessWidget.h
22  *
23  * \brief Implements a widget used to return a set of Data Access object.
24  */
25 
26 #ifndef __TERRALIB_VP_QT_INTERNAL_INPUTDATAACCESSWIDGET_H
27 #define __TERRALIB_VP_QT_INTERNAL_INPUTDATAACCESSWIDGET_H
28 
29 #include "../Config.h"
30 
31  // TerraLib Includes
32 #include "../../dataaccess/utils/DataAccess.h"
33 #include "../../maptools/AbstractLayer.h"
34 
35 // STL Includes
36 #include <memory>
37 
38  // Qt Includes
39 #include <QWidget>
40 
41 namespace Ui { class InputDataAccessWidgetForm; }
42 
43 namespace te
44 {
45  namespace vp
46  {
47  namespace qt
48  {
49  class InputDataAccessItemWidget;
50 
51  /*!
52  \class InputDataAccessWidget
53 
54  \brief Implements a widget used to return a set of Data Access object.
55  */
56  class TEVPEXPORT InputDataAccessWidget : public QWidget
57  {
58  Q_OBJECT
59 
60  public:
61 
62  /*!
63  \brief Constructor.
64  */
65  InputDataAccessWidget(QWidget* parent = 0, Qt::WindowFlags f = 0);
66 
67  /*!
68  \brief Destructor.
69  */
71 
72  public:
73 
74  /*!
75  \brief Returns the internal widget
76 
77  \return Pointer to Qt Widget InputDataAccessWidgetForm
78  */
79  Ui::InputDataAccessWidgetForm* getForm() const;
80 
81  /*!
82  \brief Set the number of input data access
83 
84  \param nDataAccess Number of input data access
85  */
86  void setNumbersOfInputDataAccess(const std::size_t& nDataAccess, const std::list<te::map::AbstractLayerPtr>& layers);
87 
88  /*!
89  \brief Get a vector of DataAccess given the user defined parameters in the interface
90 
91  \return a vector of TerraLib DataAccess object
92  */
93  std::vector< std::unique_ptr<te::da::DataAccess> > getDataAccessVector();
94 
95  private:
96 
97  std::vector<te::vp::qt::InputDataAccessItemWidget*> inputDataAccessItemWidgetVec;
98 
99  std::unique_ptr<Ui::InputDataAccessWidgetForm> m_ui; //!< Pointer to Qt widget
100  };
101  } // end namespace qt
102  } // end namespace qt
103 } // end namespace qt
104 
105 
106 #endif // __TERRALIB_VP_QT_INTERNAL_INPUTDATAACCESSWIDGET_H
107 
#define TEVPEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:61
Implements a widget used to return a set of Data Access object.
std::vector< te::vp::qt::InputDataAccessItemWidget * > inputDataAccessItemWidgetVec
TerraLib.
std::unique_ptr< Ui::InputDataAccessWidgetForm > m_ui
Pointer to Qt widget.