25 #ifndef __TERRALIB_QT_WIDGETS_LAYER_INTERNAL_LAYERITEMMODEL_H 26 #define __TERRALIB_QT_WIDGETS_LAYER_INTERNAL_LAYERITEMMODEL_H 28 #include "../../Config.h" 32 #include "../../../../maptools/AbstractLayer.h" 36 #include <QAbstractItemModel> 43 #ifndef Q_DECL_OVERRIDE 44 #define Q_DECL_OVERRIDE 128 void addLayers(
const std::list<te::map::AbstractLayerPtr>& layers,
const std::string& idxPath =
"./");
139 void addLayers(
const std::list<te::map::AbstractLayerPtr>& layers,
const QModelIndex& parent,
const std::string& idxPath =
"./");
148 void setLayers(
const std::list<te::map::AbstractLayerPtr>& layers);
168 void addItems(
const std::vector<TreeItem*> items,
TreeItem* parent,
const int& pos = 0);
177 void addFolder(
const std::string& name,
TreeItem* parent = 0);
186 void addFolder(
const std::string& name,
const QModelIndex& idx);
201 std::list<te::map::AbstractLayerPtr> getAllLayers();
210 std::list<te::map::AbstractLayerPtr> getVisibleLayers();
219 QVariant data(
const QModelIndex &index,
int role)
const Q_DECL_OVERRIDE;
223 QVariant headerData(
int section, Qt::Orientation orientation,
226 QModelIndex index(
int row,
int column,
231 int rowCount(
const QModelIndex &parent = QModelIndex())
const Q_DECL_OVERRIDE;
233 int columnCount(
const QModelIndex &parent = QModelIndex())
const Q_DECL_OVERRIDE;
235 bool setData(
const QModelIndex & index,
const QVariant & value,
int role = Qt::EditRole)
Q_DECL_OVERRIDE;
237 bool removeRows(
int row,
int count,
const QModelIndex & parent = QModelIndex())
Q_DECL_OVERRIDE;
239 bool insertRows(
int row,
int count,
const QModelIndex& parent = QModelIndex())
Q_DECL_OVERRIDE;
245 QMimeData* mimeData(
const QModelIndexList &indexes)
const Q_DECL_OVERRIDE;
247 bool canDropMimeData(
const QMimeData *data, Qt::DropAction action,
int row,
int column,
const QModelIndex &parent);
249 bool dropMimeData(
const QMimeData *data, Qt::DropAction action,
int row,
int column,
const QModelIndex &parent)
Q_DECL_OVERRIDE;
257 void removeItems(
const QModelIndexList& lst);
271 void visibilityChanged();
284 #endif // __TERRALIB_QT_WIDGETS_LAYER_INTERNAL_LAYERITEMMODEL_H
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr