Loading...
Searching...
No Matches
QueryConditionWidget.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/QueryConditionWidget.h
22
23 \brief This file has the Query Condition Widget class.
24*/
25
26#ifndef __TERRALIB_QT_WIDGETS_QUERY_INTERNAL_QUERYCONDITIONWIDGET_H
27#define __TERRALIB_QT_WIDGETS_QUERY_INTERNAL_QUERYCONDITIONWIDGET_H
28
29// TerraLib
30#ifndef Q_MOC_RUN
31#include "../../../dataaccess/dataset/DataSetType.h"
32#include "../../../dataaccess/datasource/DataSource.h"
33#include "../../../dataaccess/query/Function.h"
34#include "../Config.h"
35#endif
36
37// STL
38#include <memory>
39
40// Qt
41#include <QTreeWidgetItem>
42#include <QWidget>
43
44namespace Ui { class QueryConditionWidgetForm; }
45
46namespace te
47{
48 namespace qt
49 {
50 namespace widgets
51 {
52 class QueryConnectorWidget;
53 /*!
54 \class QueryConditionWidget
55
56 \brief This class is used to define the Query Condition for a where clause.
57 */
59 {
60 Q_OBJECT
61
62 public:
63
64 QueryConditionWidget(te::da::DataSourcePtr dataSource, std::string dataSetName, te::da::DataSetType* dsType, QWidget* parent = 0, Qt::WindowFlags f = 0);
65
67
69
71
73
75
76 protected:
77
79
81
82 void fillValuesComboBox(QStringList& list);
83
84 std::string getAliasName(std::string fullName);
85
86 signals:
87
88 void addConnectorClicked(QWidget* owner, QWidget* parent);
89
90 void removeConnectorClicked(QWidget* owner, QWidget* parent);
91
93
94 protected slots:
95
97
99
101
102 private:
103
104 std::unique_ptr<Ui::QueryConditionWidgetForm> m_ui;
105
107
109
110 std::string m_dataSetName;
111
112 std::unique_ptr<te::da::DataSetType> m_dsType;
113
114 public:
115
116 QTreeWidgetItem * m_item;
117 };
118
119 } // end namespace widgets
120 } // end namespace qt
121} // end namespace te
122
123#endif // __TERRALIB_QT_WIDGETS_QUERY_INTERNAL_QUERYCONDITIONWIDGET_H
A class that models the description of a dataset.
Definition: DataSetType.h:73
This is an abstract class that models a query expression.
Definition: Expression.h:48
A class that models a Function expression.
Definition: Function.h:48
This class is used to define the Query Condition for a where clause.
std::unique_ptr< te::da::DataSetType > m_dsType
void setCurrentCondition(te::da::Function *func)
te::qt::widgets::QueryConnectorWidget * m_parent
void addConnectorClicked(QWidget *owner, QWidget *parent)
te::qt::widgets::QueryConnectorWidget * getConnectorParent()
std::unique_ptr< Ui::QueryConditionWidgetForm > m_ui
void removeConnectorClicked(QWidget *owner, QWidget *parent)
QueryConditionWidget(te::da::DataSourcePtr dataSource, std::string dataSetName, te::da::DataSetType *dsType, QWidget *parent=0, Qt::WindowFlags f=0)
te::da::Expression * getExpression()
void setConnectorParent(te::qt::widgets::QueryConnectorWidget *parent)
std::string getAliasName(std::string fullName)
void fillValuesComboBox(QStringList &list)
This class is used to define the Query Connector for a where clause.
boost::shared_ptr< DataSource > DataSourcePtr
Definition: DataSource.h:1449
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