26 #ifndef __TERRALIB_QT_WIDGETS_LAYER_EXLORER_INTERNAL_LAYERTREEMODEL_H 
   27 #define __TERRALIB_QT_WIDGETS_LAYER_EXLORER_INTERNAL_LAYERTREEMODEL_H 
   30 #include "../../../../maptools/AbstractLayer.h" 
   31 #include "../../Config.h" 
   37 #include <QtCore/QAbstractItemModel> 
   45       class AbstractTreeItem;
 
   66           LayerTreeModel(
const std::list<te::map::AbstractLayerPtr>& layers, QObject* parent = 0);
 
   76           void set(
const std::list<te::map::AbstractLayerPtr>& layers);
 
   83           const std::vector<te::map::AbstractLayerPtr>& getTopLayers() 
const;
 
   90           const std::vector<te::qt::widgets::AbstractTreeItem*>& getTopLayerItems() 
const;
 
   99           bool canFetchMore(
const QModelIndex& parent) 
const;
 
  106           void fetchMore(
const QModelIndex& parent);
 
  115           int columnCount(
const QModelIndex& parent = QModelIndex()) 
const;
 
  124           int rowCount(
const QModelIndex & parent = QModelIndex()) 
const;
 
  138           QModelIndex index(
int row, 
int column, 
const QModelIndex & parent = QModelIndex()) 
const;
 
  147           QModelIndex parent(
const QModelIndex & index) 
const;
 
  156           Qt::ItemFlags flags(
const QModelIndex& index) 
const;
 
  166           QVariant data(
const QModelIndex& index, 
int role = Qt::DisplayRole) 
const;
 
  179           bool setData(
const QModelIndex& index, 
const QVariant& value, 
int role = Qt::EditRole);
 
  188           bool hasChildren(
const QModelIndex& parent = QModelIndex()) 
const;
 
  195           QStringList mimeTypes() 
const;
 
  202           Qt::DropActions supportedDropActions() 
const;
 
  214           QMimeData* mimeData(
const QModelIndexList& indexes) 
const;
 
  227           bool dropMimeData(
const QMimeData* data, Qt::DropAction action,
 
  228                             int row, 
int column, 
const QModelIndex& parent);
 
  240           bool insertRows(
int row, 
int count, 
const QModelIndex& parent = QModelIndex());
 
  252           bool removeRows(
int row, 
int count, 
const QModelIndex& parent = QModelIndex());
 
  259           void setCheckable(
const bool checkable);
 
  266           bool isCheckable() 
const;
 
  308           void layerOrderChanged();
 
  317           void removeLayerFromParentChildrenList(std::vector<te::map::AbstractLayerPtr>& layers);
 
  324           void emitDataChangedForDescendants(
const QModelIndex& parent);
 
  331           void emitDataChangedForAncestors(
const QModelIndex& index);
 
  345 #endif // __TERRALIB_QT_WIDGETS_LAYER_EXLORER_INTERNAL_LAYERTREEMODEL_H 
std::vector< te::map::AbstractLayerPtr > m_insertingLayers
The list of layers to be inserted. 
 
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module. 
 
std::vector< te::map::AbstractLayerPtr > m_layers
The list of top level layers. 
 
The class that represents an item in a LayerTreeModel. 
 
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
 
bool m_checkable
It informs if the model is checkable. 
 
std::vector< AbstractTreeItem * > m_items
The list of top level items.