Loading...
Searching...
No Matches
DoubleListWidget.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/utils/DoubleListWidget.h
22
23 \brief ...
24*/
25
26#ifndef __TERRALIB_QT_WIDGETS_UTILS_INTERNAL_DOUBLELISTWIDGET_H
27#define __TERRALIB_QT_WIDGETS_UTILS_INTERNAL_DOUBLELISTWIDGET_H
28
29// TerraLib
30#include "../Config.h"
31
32// STL
33#include <memory>
34
35// Qt
36#include <QWidget>
37
38class QListWidgetItem;
39
40namespace Ui { class DoubleListWidgetForm; }
41
42namespace te
43{
44 namespace qt
45 {
46 namespace widgets
47 {
48 /*!
49 \class DoubleListWidget
50
51 \brief ...
52 */
53 class TEQTWIDGETSEXPORT DoubleListWidget : public QWidget
54 {
55 Q_OBJECT
56
57 public:
58
59 DoubleListWidget(QWidget* parent = 0, Qt::WindowFlags f = 0);
60
62
63 Ui::DoubleListWidgetForm* getForm() const;
64
65 void addItems(QList<QListWidgetItem*> list);
66
67 void addItems(const std::vector<int>& ids);
68
69 void removeItems(QList<QListWidgetItem*> list);
70
71 void removeItems(const std::vector<int>& ids);
72
73 void setLeftLabel(const QString& value);
74
75 void setRightLabel(const QString& value);
76
77 void setInputValues(const std::vector<std::string>& values);
78
79 void setInputDataValues(const std::vector<std::string>& values, const std::vector<int>& ids);
80
81 void addOutputValues(const std::vector<std::string>& values);
82
83 void setOutputValues(const std::vector<std::string>& values);
84
85 void setOutputDataValues(const std::vector<std::string>& values, const std::vector<int>& ids);
86
87 void setFixedOutputValues(const std::vector<std::string>& values, const std::string& iconName);
88
89 void setFixedOutputDataValues(const std::vector<std::string>& values, const std::vector<int>& ids, const std::string& iconName);
90
91 std::vector<std::string> getOutputValues();
92
93 std::vector<int> getOutputDataValues();
94
96
98
99 void setVisibledOrderButtons(bool state);
100
101 private:
102
103 QListWidgetItem* getItemFromId(const int &id);
104
105 protected slots:
106
108
110
112
114
116
118
120
122
123 signals:
124
126
127 void itemAdded(std::vector<int> ids);
128
129 void itemRemoved(std::vector<int> ids);
130
131 private:
132
133 std::unique_ptr<Ui::DoubleListWidgetForm> m_ui;
134 };
135
136 } // end namespace widgets
137 } // end namespace qt
138} // end namespace te
139
140#endif // __TERRALIB_QT_WIDGETS_UTILS_INTERNAL_DOUBLELISTWIDGET_H
141
void setFixedOutputDataValues(const std::vector< std::string > &values, const std::vector< int > &ids, const std::string &iconName)
void addOutputValues(const std::vector< std::string > &values)
void setOutputDataValues(const std::vector< std::string > &values, const std::vector< int > &ids)
void setFixedOutputValues(const std::vector< std::string > &values, const std::string &iconName)
void itemAdded(std::vector< int > ids)
void setOutputValues(const std::vector< std::string > &values)
void itemRemoved(std::vector< int > ids)
void setInputDataValues(const std::vector< std::string > &values, const std::vector< int > &ids)
std::unique_ptr< Ui::DoubleListWidgetForm > m_ui
void addItems(QList< QListWidgetItem * > list)
void setRightLabel(const QString &value)
QListWidgetItem * getItemFromId(const int &id)
std::vector< std::string > getOutputValues()
void removeItems(QList< QListWidgetItem * > list)
void removeItems(const std::vector< int > &ids)
Ui::DoubleListWidgetForm * getForm() const
DoubleListWidget(QWidget *parent=0, Qt::WindowFlags f=0)
void addItems(const std::vector< int > &ids)
void setInputValues(const std::vector< std::string > &values)
std::vector< int > getOutputDataValues()
void setVisibledOrderButtons(bool state)
void setLeftLabel(const QString &value)
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