15 #ifndef QGSBROWSERPROXYMODEL_H 16 #define QGSBROWSERPROXYMODEL_H 18 #include "qgis_core.h" 21 #include <QSortFilterProxyModel> 68 QgsDataItem *dataItem(
const QModelIndex &index )
const;
89 void setFilterString(
const QString &filter );
96 QString filterString()
const;
103 void setFilterCaseSensitivity( Qt::CaseSensitivity sensitivity );
110 Qt::CaseSensitivity caseSensitivity()
const;
126 void setFilterByLayerType(
bool enabled );
149 bool filterAcceptsRow(
int sourceRow,
const QModelIndex &sourceParent )
const override;
155 QVector<QRegExp> mREList;
157 Qt::CaseSensitivity mCaseSensitivity = Qt::CaseInsensitive;
159 bool mFilterByLayerType =
false;
166 bool filterAcceptsString(
const QString &value )
const;
169 bool filterAcceptsAncestor(
const QModelIndex &sourceIndex )
const;
172 bool filterAcceptsDescendant(
const QModelIndex &sourceIndex )
const;
175 bool filterAcceptsItem(
const QModelIndex &sourceIndex )
const;
178 #endif // QGSBROWSERPROXYMODEL_H
FilterSyntax
Filter syntax options.
LayerType
Types of layers that can be added to a map.
Regular expression filtering.
QgsBrowserModel * browserModel()
Returns the underlying browser model.
bool filterByLayerType() const
Returns true if the model is filtered by map layer type.
Base class for all items in the model.
Standard string filtering.
A QSortFilterProxyModel subclass for filtering and sorting browser model items.
A model for showing available data sources and other items in a structured tree.