QGIS API Documentation 3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
QgsLayerTreeProxyModel Class Reference

The QgsLayerTreeProxyModel class is a proxy model for QgsLayerTreeModel, supports private layers and text filtering. More...

#include <qgslayertreeview.h>

Inheritance diagram for QgsLayerTreeProxyModel:
Inheritance graph
[legend]

Public Member Functions

 QgsLayerTreeProxyModel (QgsLayerTreeModel *treeModel, QObject *parent)
 Constructs QgsLayerTreeProxyModel with source model treeModel and a parent.
 
bool hideValidLayers () const
 Returns if valid layers should be hidden (i.e.
 
void setFilterText (const QString &filterText=QString())
 Sets filter to filterText.
 
void setHideValidLayers (bool hideValid)
 Sets whether valid layers should be hidden (i.e.
 
void setShowPrivateLayers (bool showPrivate)
 Determines if private layers are shown.
 
bool showPrivateLayers () const
 Returns if private layers are shown.
 

Protected Member Functions

bool filterAcceptsRow (int sourceRow, const QModelIndex &sourceParent) const override
 

Detailed Description

The QgsLayerTreeProxyModel class is a proxy model for QgsLayerTreeModel, supports private layers and text filtering.

Since
QGIS 3.18

Definition at line 46 of file qgslayertreeview.h.

Constructor & Destructor Documentation

◆ QgsLayerTreeProxyModel()

QgsLayerTreeProxyModel::QgsLayerTreeProxyModel ( QgsLayerTreeModel treeModel,
QObject *  parent 
)

Constructs QgsLayerTreeProxyModel with source model treeModel and a parent.

Definition at line 904 of file qgslayertreeview.cpp.

Member Function Documentation

◆ filterAcceptsRow()

bool QgsLayerTreeProxyModel::filterAcceptsRow ( int  sourceRow,
const QModelIndex &  sourceParent 
) const
overrideprotected

Definition at line 920 of file qgslayertreeview.cpp.

◆ hideValidLayers()

bool QgsLayerTreeProxyModel::hideValidLayers ( ) const

Returns if valid layers should be hidden (i.e.

only invalid layers are shown).

See also
setHideValidLayers()
Since
QGIS 3.38

Definition at line 967 of file qgslayertreeview.cpp.

◆ setFilterText()

void QgsLayerTreeProxyModel::setFilterText ( const QString &  filterText = QString())

Sets filter to filterText.

Definition at line 911 of file qgslayertreeview.cpp.

◆ setHideValidLayers()

void QgsLayerTreeProxyModel::setHideValidLayers ( bool  hideValid)

Sets whether valid layers should be hidden (i.e.

only invalid layers are shown).

See also
setHideValidLayers()
Since
QGIS 3.38

Definition at line 972 of file qgslayertreeview.cpp.

◆ setShowPrivateLayers()

void QgsLayerTreeProxyModel::setShowPrivateLayers ( bool  showPrivate)

Determines if private layers are shown.

Definition at line 958 of file qgslayertreeview.cpp.

◆ showPrivateLayers()

bool QgsLayerTreeProxyModel::showPrivateLayers ( ) const

Returns if private layers are shown.

Definition at line 953 of file qgslayertreeview.cpp.


The documentation for this class was generated from the following files: