A QSortFilterProxyModel subclass for filtering and sorting browser model items.
More...
#include <qgsbrowserproxymodel.h>
|
bool | filterAcceptsRow (int sourceRow, const QModelIndex &sourceParent) const override |
|
A QSortFilterProxyModel subclass for filtering and sorting browser model items.
- Since
- QGIS 3.4
Definition at line 32 of file qgsbrowserproxymodel.h.
◆ FilterSyntax
Filter syntax options.
Enumerator |
---|
Normal | Standard string filtering.
|
Wildcards | Wildcard filtering.
|
RegularExpression | Regular expression filtering.
|
Definition at line 38 of file qgsbrowserproxymodel.h.
◆ QgsBrowserProxyModel()
QgsBrowserProxyModel::QgsBrowserProxyModel |
( |
QObject * |
parent = nullptr | ) |
|
|
explicit |
◆ browserModel()
◆ caseSensitivity()
Qt::CaseSensitivity QgsBrowserProxyModel::caseSensitivity |
( |
| ) |
const |
◆ dataItem()
QgsDataItem * QgsBrowserProxyModel::dataItem |
( |
const QModelIndex & |
index | ) |
const |
Returns the data item at the specified proxy index, or nullptr
if no item exists at the index.
Definition at line 38 of file qgsbrowserproxymodel.cpp.
◆ filterAcceptsRow()
bool QgsBrowserProxyModel::filterAcceptsRow |
( |
int |
sourceRow, |
|
|
const QModelIndex & |
sourceParent |
|
) |
| const |
|
overrideprotected |
◆ filterByLayerType()
bool QgsBrowserProxyModel::filterByLayerType |
( |
| ) |
const |
|
inline |
◆ filterString()
QString QgsBrowserProxyModel::filterString |
( |
| ) |
const |
◆ filterSyntax()
◆ hasChildren()
bool QgsBrowserProxyModel::hasChildren |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
|
override |
◆ layerType()
◆ setBrowserModel()
◆ setFilterByLayerType()
void QgsBrowserProxyModel::setFilterByLayerType |
( |
bool |
enabled | ) |
|
◆ setFilterCaseSensitivity()
void QgsBrowserProxyModel::setFilterCaseSensitivity |
( |
Qt::CaseSensitivity |
sensitivity | ) |
|
◆ setFilterString()
void QgsBrowserProxyModel::setFilterString |
( |
const QString & |
filter | ) |
|
◆ setFilterSyntax()
void QgsBrowserProxyModel::setFilterSyntax |
( |
FilterSyntax |
syntax | ) |
|
◆ setHiddenDataItemProviderKeyFilter()
void QgsBrowserProxyModel::setHiddenDataItemProviderKeyFilter |
( |
const QStringList & |
hiddenItemsFilter | ) |
|
Sets a filter to hide data items based on QgsDataItem::providerKey() associated with the item.
By default browser model shows all items from all available data item providers and few special items (e.g. Favorites). To customize the behavior, set the filter to not load certain data items. The items that are not based on data item providers have prefix "special:", for example "special:Favorites", "special:Home", "PostGIS", "MSSQL"
All items created by the providers listed in filter are hidden from the layer tree. This filter is always evaluated.
- Parameters
-
hiddenItemsFilter | a list of data provider prefixes that will be hidden. |
- Since
- QGIS 3.12
Definition at line 265 of file qgsbrowserproxymodel.cpp.
◆ setLayerType()
◆ setShowLayers()
void QgsBrowserProxyModel::setShowLayers |
( |
bool |
showLayers | ) |
|
◆ setShownDataItemProviderKeyFilter()
void QgsBrowserProxyModel::setShownDataItemProviderKeyFilter |
( |
const QStringList & |
shownItemsFilter | ) |
|
Sets a filter to show data items based on QgsDataItem::providerKey() associated with the item.
By default browser model shows all items from all available data item providers and few special items (e.g. Favorites). To customize the behavior, set the filter to load only certain data items. The items that are not based on data item providers have prefix "special:", for example "special:Favorites", "special:Home", "PostGIS", "MSSQL"
Only the items created by the providers listed in filter are shown in the layer tree. This filter is always evaluated.
- Parameters
-
shownItemsFilter | a list of data provider prefixes that will be hidden. |
- Since
- QGIS 3.14
Definition at line 271 of file qgsbrowserproxymodel.cpp.
◆ showLayers()
bool QgsBrowserProxyModel::showLayers |
( |
| ) |
const |
◆ mModel
The documentation for this class was generated from the following files: