Loading...
Searching...
No Matches
LayerSearchWidget.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/layer/search/LayerSearchWidget.h
22
23 \brief This file defines the LayerSearchWidget class.
24*/
25
26#ifndef __TERRALIB_QT_WIDGETS_LAYER_SEARCH_INTERNAL_LAYERSEARCHWIDGET_H
27#define __TERRALIB_QT_WIDGETS_LAYER_SEARCH_INTERNAL_LAYERSEARCHWIDGET_H
28
29// TerraLib
30#ifndef Q_MOC_RUN
31#include "../../../../maptools/AbstractLayer.h"
32#endif
33#include "../../Config.h"
34
35// STL
36#include <list>
37#include <memory>
38
39// Qt
40#include <QTreeWidgetItem>
41#include <QWidget>
42
43namespace Ui { class LayerSearchWidgetForm; }
44
45namespace te
46{
47 namespace qt
48 {
49 namespace widgets
50 {
51 /*!
52 \class LayerSearchWidget
53
54 \brief A widget used to search layers over list of layers.
55
56 \ingroup widgets
57 */
58 class TEQTWIDGETSEXPORT LayerSearchWidget : public QWidget
59 {
60 Q_OBJECT
61
62 public:
63
64 LayerSearchWidget(QWidget* parent = 0, Qt::WindowFlags f = 0);
65
67
68 Ui::LayerSearchWidgetForm* getForm() const;
69
70 public:
71
72 void enableMultiSelection(bool flag);
73
74 std::list<te::map::AbstractLayerPtr> getSelecteds() const;
75
76 void setList(std::list<te::map::AbstractLayerPtr>& layerList);
77
79
81
82 void filterAll();
83
84 void setMinRasterBands(std::size_t value);
85
86 void setMaxRasterBands(std::size_t value);
87
88 protected:
89
90 void fillTreeView(std::list<te::map::AbstractLayerPtr>& layerList);
91
92 void filter(const QList<QTreeWidgetItem*>& items);
93
94 private slots:
95
96 void onFilter();
97
98 private:
99
100 std::unique_ptr<Ui::LayerSearchWidgetForm> m_ui;
101
102 std::list<te::map::AbstractLayerPtr> m_layerList;
103
106
109 };
110 } // end namespace widgets
111 } // end namespace qt
112} // end namespace te
113
114#endif // __TERRALIB_QT_WIDGETS_LAYER_SEARCH_INTERNAL_LAYERSEARCHWIDGET_H
A widget used to search layers over list of layers.
std::unique_ptr< Ui::LayerSearchWidgetForm > m_ui
void fillTreeView(std::list< te::map::AbstractLayerPtr > &layerList)
std::list< te::map::AbstractLayerPtr > getSelecteds() const
void setMaxRasterBands(std::size_t value)
std::list< te::map::AbstractLayerPtr > m_layerList
LayerSearchWidget(QWidget *parent=0, Qt::WindowFlags f=0)
void filter(const QList< QTreeWidgetItem * > &items)
Ui::LayerSearchWidgetForm * getForm() const
void setMinRasterBands(std::size_t value)
void setList(std::list< te::map::AbstractLayerPtr > &layerList)
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