16 #ifndef QGSMAPLAYERMODEL_H 17 #define QGSMAPLAYERMODEL_H 19 #include <QAbstractItemModel> 20 #include <QSortFilterProxyModel> 21 #include <QStringList> 41 LayerIdRole = Qt::UserRole + 1,
57 void setItemsCheckable(
bool checkable );
61 void checkAll( Qt::CheckState checkState );
92 #if QT_VERSION >= 0x050000 105 #endif // QGSMAPLAYERMODEL_H
virtual int rowCount(const QModelIndex &parent) const=0
Base class for all map layer types.
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const=0
ItemDataRole
Item data roles.
QList< QgsMapLayer * > mLayers
const QHash< int, QByteArray > & roleNames() const
The QgsMapLayerModel class is a model to display layers in widgets.
QMap< QString, Qt::CheckState > mLayersChecked
virtual QVariant data(const QModelIndex &index, int role) const=0
virtual int columnCount(const QModelIndex &parent) const=0
bool itemsCheckable() const
returns if the items can be checked or not
virtual bool setData(const QModelIndex &index, const QVariant &value, int role)
virtual Qt::ItemFlags flags(const QModelIndex &index) const