16 #ifndef QGSMAPLAYERMODEL_H
17 #define QGSMAPLAYERMODEL_H
19 #include <QAbstractItemModel>
20 #include <QSortFilterProxyModel>
21 #include <QStringList>
45 explicit QgsMapLayerModel( QList<QgsMapLayer*> layers, QObject *parent = 0 );
50 void setItemsCheckable(
bool checkable );
54 void checkAll( Qt::CheckState checkState );
58 QList<QgsMapLayer*> layersChecked( Qt::CheckState checkState = Qt::Checked );
65 QModelIndex indexFromLayer(
QgsMapLayer* layer )
const;
69 void removeLayers(
const QStringList layerIds );
70 void addLayers( QList<QgsMapLayer*> layers );
79 QModelIndex
index(
int row,
int column,
const QModelIndex &parent = QModelIndex() )
const;
80 QModelIndex parent(
const QModelIndex &child )
const;
81 int rowCount(
const QModelIndex &parent )
const;
82 int columnCount(
const QModelIndex &parent )
const;
83 QVariant data(
const QModelIndex &
index,
int role )
const;
84 bool setData(
const QModelIndex &
index,
const QVariant &value,
int role );
85 Qt::ItemFlags flags(
const QModelIndex &
index )
const;
88 #endif // QGSMAPLAYERMODEL_H