16#ifndef QGSCUSTOMLAYERORDERWIDGET_H
17#define QGSCUSTOMLAYERORDERWIDGET_H
21#include <QAbstractListModel>
24class CustomLayerOrderModel;
54 void bridgeHasCustomLayerOrderChanged(
bool state );
55 void bridgeCustomLayerOrderChanged();
64 QCheckBox *mChkOverride =
nullptr;
65 CustomLayerOrderModel *mModel =
nullptr;
66 QListView *mView =
nullptr;
72class CustomLayerOrderModel :
public QAbstractListModel
79 int rowCount(
const QModelIndex & )
const override;
81 QVariant data(
const QModelIndex &index,
int role )
const override;
83 bool setData(
const QModelIndex &index,
const QVariant &value,
int role )
override;
85 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
87 Qt::DropActions supportedDropActions()
const override;
89 QStringList mimeTypes()
const override;
91 QMimeData *mimeData(
const QModelIndexList &indexes )
const override;
93 bool dropMimeData(
const QMimeData *data, Qt::DropAction action,
int row,
int column,
const QModelIndex &parent )
override;
95 bool removeRows(
int row,
int count,
const QModelIndex &parent )
override;
97 void refreshModel(
const QList<QgsMapLayer *> &order );
99 QStringList order()
const {
return mOrder; }
101 void updateLayerVisibility(
const QString &layerId );
The QgsLayerTreeMapCanvasBridge class takes care of updates of layer set for QgsMapCanvas from a laye...
This class is a base class for nodes in a layer tree.
Base class for all map layer types.