108 void setItemsCheckable(
bool checkable );
130 void setItemsCanBeReordered(
bool allow );
138 bool itemsCanBeReordered() const;
143 void checkAll( Qt::CheckState checkState );
152 void setAllowEmptyLayer(
bool allowEmpty, const QString &text = QString(), const QIcon &icon = QIcon() );
164 void setShowCrs(
bool showCrs );
175 QList<QgsMapLayer *> layersChecked( Qt::CheckState checkState = Qt::Checked );
180 void setLayersChecked(
const QList< QgsMapLayer * > &layers );
189 QModelIndex indexFromLayer(
QgsMapLayer *layer )
const;
195 QgsMapLayer *layerFromIndex(
const QModelIndex &index )
const;
203 void setAdditionalItems(
const QStringList &items );
220 void setAdditionalLayers(
const QList<QgsMapLayer *> &layers );
228 QList< QgsMapLayer * > additionalLayers()
const;
231 QModelIndex index(
int row,
int column,
const QModelIndex &parent = QModelIndex() )
const override;
232 QModelIndex parent(
const QModelIndex &child )
const override;
233 int rowCount(
const QModelIndex &parent = QModelIndex() )
const override;
234 int columnCount(
const QModelIndex &parent = QModelIndex() )
const override;
235 QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole )
const override;
236 bool setData(
const QModelIndex &index,
const QVariant &value,
int role = Qt::EditRole )
override;
237 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
238 bool insertRows(
int row,
int count,
const QModelIndex &parent = QModelIndex() )
override;
239 bool removeRows(
int row,
int count,
const QModelIndex &parent = QModelIndex() )
override;
240 QStringList mimeTypes()
const override;
241 bool canDropMimeData(
const QMimeData *data, Qt::DropAction action,
int row,
int column,
const QModelIndex &parent )
const override;
242 QMimeData *mimeData(
const QModelIndexList &indexes )
const override;
243 bool dropMimeData(
const QMimeData *data, Qt::DropAction action,
int row,
int column,
const QModelIndex &parent )
override;
244 Qt::DropActions supportedDropActions()
const override;
251 QHash<int, QByteArray> roleNames() const override
SIP_SKIP;
259 void removeLayers( const QStringList &layerIds );
260 void addLayers( const QList<
QgsMapLayer *> &layers );
272 bool mAllowEmpty = false;
275 bool mShowCrs = false;
276 QStringList mAdditionalItems;