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