Class: QgsProjectStoredObjectManagerProxyModelBase

Base class QSortFilterProxyModel subclass for QgsProjectStoredObjectManagerModel.

Supports sorting by object name and text based filtering against the object name.

Added in version 4.0.

Class Hierarchy

Inheritance diagram of qgis.core.QgsProjectStoredObjectManagerProxyModelBase

Base classes

QSortFilterProxyModel

QAbstractProxyModel

QAbstractItemModel

QObject

Subclasses

QgsElevationProfileManagerProxyModel

QSortFilterProxyModel subclass for QgsElevationProfileManagerModel.

QgsLayoutManagerProxyModel

QSortFilterProxyModel subclass for QgsLayoutManagerModel.

QgsSelectiveMaskingSourceSetManagerProxyModel

QSortFilterProxyModel subclass for QgsSelectiveMaskingSourceSetManagerModel.

Methods

filterString

Returns the current filter string, if set.

setFilterString

Sets a filter string, such that only layouts with names containing the specified string will be shown.

Virtual Methods

In PyQGIS, only methods marked as virtual can be safely overridden in a Python subclass of QgsProjectStoredObjectManagerProxyModelBase. See the FAQ for more details.

filterAcceptsRowInternal

Returns True if the proxy accepts the matching source row.

class qgis.core.QgsProjectStoredObjectManagerProxyModelBase[source]

Bases: QSortFilterProxyModel

__init__(parent: QObject | None = None)

Constructor for QgsProjectStoredObjectManagerProxyModelBase.

Parameters:

parent (Optional[QObject] = None)

virtual filterAcceptsRowInternal(self, sourceRow: int, sourceParent: QModelIndex) bool[source]

Returns True if the proxy accepts the matching source row.

Handles filtering based on object name.

Subclasses should override this method instead of filterAcceptsRow().

Parameters:
  • sourceRow (int)

  • sourceParent (QModelIndex)

Return type:

bool

filterString(self) str[source]

Returns the current filter string, if set.

Return type:

str

setFilterString(self, filter: str | None)[source]

Sets a filter string, such that only layouts with names containing the specified string will be shown.

See also

filterString()

Parameters:

filter (Optional[str])