QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
QgsLayoutManagerProxyModel Class Reference

QSortFilterProxyModel subclass for QgsLayoutManagerModel. More...

#include <qgslayoutmanagermodel.h>

Inheritance diagram for QgsLayoutManagerProxyModel:

Public Types

enum  Filter { FilterPrintLayouts = 1 << 1 , FilterReports = 1 << 2 }
 Available filter flags for filtering the model. More...
typedef QFlags< FilterFilters

Public Member Functions

 QgsLayoutManagerProxyModel (QObject *parent=nullptr)
 Constructor for QgsLayoutManagerProxyModel.
QgsLayoutManagerProxyModel::Filters filters () const
 Returns the current filters used for filtering available layouts.
void setFilters (QgsLayoutManagerProxyModel::Filters filters)
 Sets the current filters used for filtering available layouts.
Public Member Functions inherited from QgsProjectStoredObjectManagerProxyModel< QgsMasterLayoutInterface >
 QgsProjectStoredObjectManagerProxyModel (QObject *parent=nullptr)
 Constructor for QgsProjectStoredObjectManagerProxyModel.
Public Member Functions inherited from QgsProjectStoredObjectManagerProxyModelBase
 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

bool filterAcceptsRowInternal (int sourceRow, const QModelIndex &sourceParent) const override
 Returns true if the proxy accepts the matching source row.
Protected Member Functions inherited from QgsProjectStoredObjectManagerProxyModel< QgsMasterLayoutInterface >
bool filterAcceptsRowInternal (int sourceRow, const QModelIndex &sourceParent) const override
 Returns true if the proxy accepts the matching source row.

Additional Inherited Members

Public Slots inherited from QgsProjectStoredObjectManagerProxyModelBase
void setFilterString (const QString &filter)
 Sets a filter string, such that only layouts with names containing the specified string will be shown.
Protected Attributes inherited from QgsProjectStoredObjectManagerProxyModelBase
QString mFilterString
 Filter string.

Detailed Description

QSortFilterProxyModel subclass for QgsLayoutManagerModel.

Since
QGIS 3.8

Definition at line 113 of file qgslayoutmanagermodel.h.

Member Typedef Documentation

◆ Filters

Definition at line 125 of file qgslayoutmanagermodel.h.

Member Enumeration Documentation

◆ Filter

Available filter flags for filtering the model.

Enumerator
FilterPrintLayouts 

Includes print layouts.

FilterReports 

Includes reports.

Definition at line 120 of file qgslayoutmanagermodel.h.

Constructor & Destructor Documentation

◆ QgsLayoutManagerProxyModel()

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

Constructor for QgsLayoutManagerProxyModel.

Definition at line 55 of file qgslayoutmanagermodel.cpp.

Member Function Documentation

◆ filterAcceptsRowInternal()

bool QgsLayoutManagerProxyModel::filterAcceptsRowInternal ( int sourceRow,
const QModelIndex & sourceParent ) const
overrideprotectedvirtual

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 from QgsProjectStoredObjectManagerProxyModelBase.

Definition at line 60 of file qgslayoutmanagermodel.cpp.

◆ filters()

QgsLayoutManagerProxyModel::Filters QgsLayoutManagerProxyModel::filters ( ) const

Returns the current filters used for filtering available layouts.

See also
setFilters()

Definition at line 86 of file qgslayoutmanagermodel.cpp.

◆ setFilters()

void QgsLayoutManagerProxyModel::setFilters ( QgsLayoutManagerProxyModel::Filters filters)

Sets the current filters used for filtering available layouts.

See also
filters()

Definition at line 91 of file qgslayoutmanagermodel.cpp.


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