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;
 
  204 #if (QT_VERSION >= 0x050000) 
  205           Qt::DropActions supportedDragActions() 
const;
 
  218           QMimeData* mimeData(
const QModelIndexList& indexes) 
const;
 
  231           bool dropMimeData(
const QMimeData* data, Qt::DropAction action,
 
  232                             int row, 
int column, 
const QModelIndex& parent);
 
  244           bool insertRows(
int row, 
int count, 
const QModelIndex& parent = QModelIndex());
 
  256           bool removeRows(
int row, 
int count, 
const QModelIndex& parent = QModelIndex());
 
  263           void setCheckable(
const bool checkable);
 
  270           bool isCheckable() 
const;
 
  312           void layerOrderChanged();
 
  321           void removeLayerFromParentChildrenList(std::vector<te::map::AbstractLayerPtr>& layers);
 
  328           void emitDataChangedForDescendants(
const QModelIndex& parent);
 
  335           void emitDataChangedForAncestors(
const QModelIndex& index);
 
  349 #endif // __TERRALIB_QT_WIDGETS_LAYER_EXLORER_INTERNAL_LAYERTREEMODEL_H 
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr