16#ifndef QGSCUSTOMLAYERORDERWIDGET_H
17#define QGSCUSTOMLAYERORDERWIDGET_H
21#include <QAbstractListModel>
24class CustomLayerOrderModel;
52 void bridgeHasCustomLayerOrderChanged(
bool state );
53 void bridgeCustomLayerOrderChanged();
62 QCheckBox *mChkOverride =
nullptr;
63 CustomLayerOrderModel *mModel =
nullptr;
64 QListView *mView =
nullptr;
70class CustomLayerOrderModel :
public QAbstractListModel
77 int rowCount(
const QModelIndex & )
const override;
79 QVariant data(
const QModelIndex &index,
int role )
const override;
81 bool setData(
const QModelIndex &index,
const QVariant &value,
int role )
override;
83 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
85 Qt::DropActions supportedDropActions()
const override;
87 QStringList mimeTypes()
const override;
89 QMimeData *mimeData(
const QModelIndexList &indexes )
const override;
91 bool dropMimeData(
const QMimeData *data, Qt::DropAction action,
int row,
int column,
const QModelIndex &parent )
override;
93 bool removeRows(
int row,
int count,
const QModelIndex &parent )
override;
95 void refreshModel(
const QList<QgsMapLayer *> &order );
97 QStringList order()
const {
return mOrder; }
99 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.