Loading...
Searching...
No Matches
DataSourceTreeWidget.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 DataSourceTreeWidget.h
22
23 \brief A tree widget for the data sources of an application.
24 */
25
26#ifndef __TERRALIB_QT_WIDGETS_INTERNAL_DATASOURCETREEWIDGET_H
27#define __TERRALIB_QT_WIDGETS_INTERNAL_DATASOURCETREEWIDGET_H
28
29 // TerraLib
30#include "../core/DataSourceType.h"
31#include "../../Config.h"
32#include "../../../../maptools/AbstractLayer.h"
33
34// Qt
35#include <QMenu>
36#include <QTreeWidget>
37
38namespace te
39{
40 namespace qt
41 {
42 namespace widgets
43 {
44 /*!
45 \class DataSourceTreeWidget
46
47 \brief A tree widget for the data sources of an application.
48
49 */
50 class TEQTWIDGETSEXPORT DataSourceTreeWidget : public QTreeWidget
51 {
52 Q_OBJECT
53
54 /** DataSourceTreeWidget Item Type enum.
55 * Possible ways for DataSourceTreeWidget items.
56 */
58 {
61 DATASET
62 };
63
64 public:
65
66 DataSourceTreeWidget(QWidget* parent = 0);
67
69
70 public:
71
72 void setDataSourceTypes(std::vector<te::qt::widgets::DataSourceType*> dsTypes);
73
74 protected:
75
76 void initMenus();
77
78 void loadDataSources(QTreeWidgetItem* item);
79
80 void loadDataSets(QTreeWidgetItem* item);
81
82 signals:
83
84 void layersCreated(const std::list<te::map::AbstractLayerPtr>& layers);
85
86 protected slots:
87
88 void slotItemDoubleClicked(QTreeWidgetItem* item, int column);
89
90 void slotCustomContextMenu(const QPoint &point);
91
93
95
97
99
100 protected:
101
105
106 std::vector<te::qt::widgets::DataSourceType*> m_dsTypes;
107
108 };
109 } // end namespace widgets
110 } // end namespace qt
111} // end namespace te
112
113#endif // __TERRALIB_QT_WIDGETS_INTERNAL_DATASOURCETREEWIDGET_H
A tree widget for the data sources of an application.
void slotItemDoubleClicked(QTreeWidgetItem *item, int column)
void loadDataSets(QTreeWidgetItem *item)
void layersCreated(const std::list< te::map::AbstractLayerPtr > &layers)
DataSourceTreeWidgetItemType
DataSourceTreeWidget Item Type enum.
std::vector< te::qt::widgets::DataSourceType * > m_dsTypes
void slotCustomContextMenu(const QPoint &point)
void loadDataSources(QTreeWidgetItem *item)
void setDataSourceTypes(std::vector< te::qt::widgets::DataSourceType * > dsTypes)
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