Loading...
Searching...
No Matches
FieldsDialog.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/externaltable/FieldsDialog.h
22
23 \brief A Qt Dialog that allows users to modify which fields will be included in a query
24*/
25
26#ifndef __TERRALIB_QT_WIDGETS_INTERNAL_FIELDSDIALOG_H
27#define __TERRALIB_QT_WIDGETS_INTERNAL_FIELDSDIALOG_H
28
29// TerraLib
30#ifndef Q_MOC_RUN
31#include "../../../dataaccess/query/Fields.h"
32#endif
33#include "../../../dataaccess/Enums.h"
34#include "../Config.h"
35
36//QT
37#include <QDialog>
38
39namespace Ui { class FieldsDialogForm; }
40
41namespace te
42{
43 namespace qt
44 {
45 namespace widgets
46 {
47 class DoubleListWidget;
48
49 /*!
50 \class FieldsWidget
51
52 \brief This class represents a FieldsWidget component.
53 */
54 class TEQTWIDGETSEXPORT FieldsDialog : public QDialog
55 {
56 Q_OBJECT
57
58 public:
59
60 /*!
61 \brief Constructor
62
63 It constructs a FieldsWidget.
64
65 \param parent this widget's parent
66 \param f Window flags used to configure this widget
67
68 */
69 FieldsDialog(QWidget* parent = 0, Qt::WindowFlags f = 0);
70
71 /*!
72 \brief Destructor
73 */
75
76 /*!
77 \brief Clears the input values list
78 */
80
81 /*!
82 \brief Clears the output values list
83 */
85
86 /*!
87 \brief Sets the input values list
88 */
89 void setInputValues(std::vector<std::string> values);
90
91 /*!
92 \brief Sets the output values list
93 */
94
95 void setOutputValues(std::vector<std::string> values);
96
97 /*!
98 \brief Sets the fixed output values list
99 */
100 void setFixedOutputValues(std::vector<std::string> values, std::string iconName);
101
102 /*!
103 \brief Sets the label displayed above the left list widget
104 */
105 void setLeftLabel(const QString& value);
106
107 /*!
108 \brief Sets the label displayed above the right list widget
109 */
110 void setRightLabel(const QString& value);
111
112 /*!
113 \brief Returns the selected fields
114 \note By default, all fields will be used
115 \note The caller will take ownership of the returned pointer
116 */
118
119 /*!
120 \brief Returns the selected JoinType
121 */
123
124 protected
125
126 slots:
127
129
131
132 private:
133
134 std::unique_ptr<DoubleListWidget> m_fieldsWidget; //!< The widget used to select which fields will be added to the query.
135 std::unique_ptr<Ui::FieldsDialogForm> m_ui; //!< The widget's form.
136 };
137 } // end namespace widgets
138 } // end namespace qt
139} // end namespace te
140
141#endif // __TERRALIB_QT_WIDGETS_INTERNAL_FIELDSDIALOG_H
std::unique_ptr< DoubleListWidget > m_fieldsWidget
The widget used to select which fields will be added to the query.
Definition: FieldsDialog.h:134
std::unique_ptr< Ui::FieldsDialogForm > m_ui
The widget's form.
Definition: FieldsDialog.h:135
void setOutputValues(std::vector< std::string > values)
Sets the output values list.
te::da::JoinType getJoinType()
Returns the selected JoinType.
void clearOutputValues()
Clears the output values list.
void setLeftLabel(const QString &value)
Sets the label displayed above the left list widget.
void setRightLabel(const QString &value)
Sets the label displayed above the right list widget.
void setFixedOutputValues(std::vector< std::string > values, std::string iconName)
Sets the fixed output values list.
void clearInputValues()
Clears the input values list.
FieldsDialog(QWidget *parent=0, Qt::WindowFlags f=0)
Constructor.
te::da::Fields * getFields()
Returns the selected fields.
void setInputValues(std::vector< std::string > values)
Sets the input values list.
boost::ptr_vector< Field > Fields
Fields is just a boost::ptr_vector of Field pointers.
Definition: Fields.h:40
JoinType
The type of join in a query.
Definition: Enums.h:50
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