QGIS API Documentation 3.99.0-Master (21b3aa880ba)
Loading...
Searching...
No Matches
QgsProjectStoredObjectManagerProxyModelBase Class Reference

Base class QSortFilterProxyModel subclass for QgsProjectStoredObjectManagerModel. More...

#include <qgsprojectstoredobjectmanagermodel.h>

Inheritance diagram for QgsProjectStoredObjectManagerProxyModelBase:

Public Slots

void setFilterString (const QString &filter)
 Sets a filter string, such that only layouts with names containing the specified string will be shown.

Public Member Functions

 QgsProjectStoredObjectManagerProxyModelBase (QObject *parent=nullptr)
 Constructor for QgsProjectStoredObjectManagerProxyModelBase.
bool filterAcceptsRow (int sourceRow, const QModelIndex &sourceParent) const override
QString filterString () const
 Returns the current filter string, if set.
bool lessThan (const QModelIndex &left, const QModelIndex &right) const override

Protected Member Functions

virtual bool filterAcceptsRowInternal (int sourceRow, const QModelIndex &sourceParent) const
 Returns true if the proxy accepts the matching source row.

Protected Attributes

QString mFilterString
 Filter string.

Detailed Description

Base class QSortFilterProxyModel subclass for QgsProjectStoredObjectManagerModel.

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

Since
QGIS 4.0

Definition at line 172 of file qgsprojectstoredobjectmanagermodel.h.

Constructor & Destructor Documentation

◆ QgsProjectStoredObjectManagerProxyModelBase()

QgsProjectStoredObjectManagerProxyModelBase::QgsProjectStoredObjectManagerProxyModelBase ( QObject * parent = nullptr)
explicit

Member Function Documentation

◆ filterAcceptsRow()

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

Definition at line 354 of file qgsprojectstoredobjectmanagermodel.cpp.

◆ filterAcceptsRowInternal()

bool QgsProjectStoredObjectManagerProxyModelBase::filterAcceptsRowInternal ( int sourceRow,
const QModelIndex & sourceParent ) const
protectedvirtual

Returns true if the proxy accepts the matching source row.

Handles filtering based on object name.

Subclasses should override this method instead of filterAcceptsRow().

Reimplemented in QgsLayoutManagerProxyModel, QgsProjectStoredObjectManagerProxyModel< T >, QgsProjectStoredObjectManagerProxyModel< QgsElevationProfile >, and QgsProjectStoredObjectManagerProxyModel< QgsMasterLayoutInterface >.

Definition at line 365 of file qgsprojectstoredobjectmanagermodel.cpp.

◆ filterString()

QString QgsProjectStoredObjectManagerProxyModelBase::filterString ( ) const
inline

Returns the current filter string, if set.

See also
setFilterString()

Definition at line 190 of file qgsprojectstoredobjectmanagermodel.h.

◆ lessThan()

bool QgsProjectStoredObjectManagerProxyModelBase::lessThan ( const QModelIndex & left,
const QModelIndex & right ) const
override

Definition at line 342 of file qgsprojectstoredobjectmanagermodel.cpp.

◆ setFilterString

void QgsProjectStoredObjectManagerProxyModelBase::setFilterString ( const QString & filter)
slot

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

See also
filterString()

Definition at line 359 of file qgsprojectstoredobjectmanagermodel.cpp.

Member Data Documentation

◆ mFilterString

QString QgsProjectStoredObjectManagerProxyModelBase::mFilterString
protected

Filter string.

Definition at line 214 of file qgsprojectstoredobjectmanagermodel.h.


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