26 #ifndef __TERRALIB_VP_QT_INTERNAL_LAYERTREEMODEL_H
27 #define __TERRALIB_VP_QT_INTERNAL_LAYERTREEMODEL_H
30 #include "../../maptools/AbstractLayer.h"
31 #include "../../qt/widgets/layer/explorer/AbstractTreeItem.h"
32 #include "../Config.h"
38 #include <QtCore/QAbstractItemModel>
56 LayerTreeModel(
const std::list<te::map::AbstractLayerPtr>& layers,
bool singleSelection =
false, QObject * parent = 0);
68 bool canFetchMore(
const QModelIndex& parent)
const;
77 int columnCount(
const QModelIndex& parent = QModelIndex())
const;
87 QVariant data(
const QModelIndex& index,
int role = Qt::DisplayRole)
const;
94 void fetchMore(
const QModelIndex& parent);
103 Qt::ItemFlags flags(
const QModelIndex& index)
const;
112 bool hasChildren(
const QModelIndex& parent = QModelIndex())
const;
126 QModelIndex index(
int row,
int column,
const QModelIndex & parent = QModelIndex())
const;
135 QModelIndex parent(
const QModelIndex & index)
const;
144 int rowCount(
const QModelIndex & parent = QModelIndex())
const;
157 bool setData(
const QModelIndex& index,
const QVariant& value,
int role = Qt::EditRole);
168 QVariant headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole)
const;
175 std::map<te::map::AbstractLayerPtr, std::vector<te::dt::Property*> > getSelected();
177 void setLayerList(
const std::list<te::map::AbstractLayerPtr>& layers);
181 std::vector<te::qt::widgets::AbstractTreeItem*>
m_items;
188 #endif // __TERRALIB_VP_QT_INTERNAL_LAYERTREEMODEL_H
#define TEVPEXPORT
You can use this macro in order to export/import classes and functions from this module.
std::vector< te::qt::widgets::AbstractTreeItem * > m_items
bool m_singleSelection
If is single selection or multiselection.