Main Page
Modules
Namespaces
Classes
Files
File List
File Members
AbstractDataSourceTreeItem.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/datasource/explorer/AbstractDataSourceTreeItem.h
22
23
\brief A class that represents an item from a DataSourceTreeModel.
24
*/
25
26
#ifndef __TERRALIB_QT_WIDGETS_INTERNAL_ABSTRACTDATASOURCETREEITEM_H
27
#define __TERRALIB_QT_WIDGETS_INTERNAL_ABSTRACTDATASOURCETREEITEM_H
28
29
// TerraLib
30
#include "../../Config.h"
31
32
//Qt
33
#include <QtCore/QModelIndex>
34
#include <QtCore/QObject>
35
#include <QtCore/QVariant>
36
37
// Forward declaration
38
class
QMenu;
39
class
QWidget
;
40
41
namespace
te
42
{
43
namespace
qt
44
{
45
namespace
widgets
46
{
47
class
TEQTWIDGETSEXPORT
AbstractDataSourceTreeItem
:
public
QObject
48
{
49
Q_OBJECT
50
51
public
:
52
53
AbstractDataSourceTreeItem
(
QObject
* parent = 0);
54
55
virtual
~
AbstractDataSourceTreeItem
();
56
57
// Returns the number of columns for the children of the item
58
virtual
int
columnCount()
const
= 0;
59
60
//Returns the data stored under the given role
61
//http://doc.qt.nokia.com/4.7/qt.html#ItemDataRole-enum
62
virtual
QVariant data(
int
column,
int
role)
const
= 0;
63
64
virtual
QMenu* getMenu(
QWidget
* parent = 0)
const
= 0;
65
66
virtual
bool
canFetchMore()
const
= 0;
67
68
virtual
void
fetchMore() = 0;
69
70
virtual
Qt::ItemFlags flags()
const
= 0;
71
72
virtual
bool
hasChildren()
const
= 0;
73
74
virtual
bool
setData(
const
QVariant& value,
int
role = Qt::EditRole) = 0;
75
};
76
}
// end namespace widgets
77
}
// end namespace qt
78
}
// end namespace te
79
80
#endif // __TERRALIB_QT_WIDGETS_INTERNAL_ABSTRACTDATASOURCETREEITEM_H
QWidget
te::qt::widgets::AbstractDataSourceTreeItem
Definition:
AbstractDataSourceTreeItem.h:47
QObject
te
URI C++ Library.
Definition:
Attributes.h:37
TEQTWIDGETSEXPORT
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition:
src/terralib/qt/widgets/Config.h:63
terralib5_src
src
terralib
qt
widgets
datasource
explorer
AbstractDataSourceTreeItem.h
Generated on Wed Jun 6 2018 12:16:05 for TerraLib by
1.8.11