DataSetWidget.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/query/DataSetWidget.h
22 
23  \brief This file has the DataSetWidget class.
24 */
25 
26 #ifndef __TERRALIB_QT_WIDGETS_QUERY_INTERNAL_DATASETWIDGET_H
27 #define __TERRALIB_QT_WIDGETS_QUERY_INTERNAL_DATASETWIDGET_H
28 
29 // TerraLib
30 #include "../../../dataaccess/query/From.h"
31 #include "../Config.h"
32 
33 // STL
34 #include <memory>
35 #include <vector>
36 #include <string>
37 
38 // Qt
39 #include <QWidget>
40 
41 // BOOST
42 #include <boost/ptr_container/ptr_vector.hpp>
43 
44 
45 namespace Ui { class DataSetWidgetForm; }
46 
47 namespace te
48 {
49  namespace qt
50  {
51  namespace widgets
52  {
53  /*!
54  \class DataSetWidget
55 
56  \brief This class is used to define the FROM object of select operation.
57  */
58  class TEQTWIDGETSEXPORT DataSetWidget : public QWidget
59  {
60  Q_OBJECT
61 
62  public:
63 
64  DataSetWidget(QWidget* parent = 0, Qt::WindowFlags f = 0);
65 
66  ~DataSetWidget();
67 
68  Ui::DataSetWidgetForm* getForm() const;
69 
70  te::da::From* getFrom();
71 
72  void setFrom(const te::da::From* from);
73 
74  public:
75 
76  void setDataSetNames(const std::vector<std::string>& names);
77 
78  void setDataSetNames(std::vector<std::pair<std::string, std::string> >& list); // pair dsName, dsAlias
79 
80  void getDataSetNames(std::vector<std::pair<std::string, std::string> >& list); // pair dsName, dsAlias
81 
82  public slots:
83 
84  void onDataSetComboBoxActivated(const QString& value);
85 
86  void onAddDataSetPushButtonClicked();
87 
88  void onRemoveDataSetPushButtonClicked();
89 
90 
91  signals:
92 
93  void itemChanged();
94 
95 
96  private:
97 
98  std::auto_ptr<Ui::DataSetWidgetForm> m_ui;
99  };
100 
101  } // end namespace widgets
102  } // end namespace qt
103 } // end namespace te
104 
105 #endif // __TERRALIB_QT_WIDGETS_QUERY_INTERNAL_DATASETWIDGET_H
106 
std::auto_ptr< Ui::DataSetWidgetForm > m_ui
Definition: DataSetWidget.h:98
This class is used to define the FROM object of select operation.
Definition: DataSetWidget.h:58
URI C++ Library.
boost::ptr_vector< FromItem > From
It models the FROM clause for a query.
Definition: From.h:37
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63