| QGIS API Documentation
    3.22.4-Białowieża (ce8e65e95e)
    | 
Allows for filtering a QgsLayoutModel by item type. More...
#include <qgslayoutmodel.h>

| Public Member Functions | |
| QgsLayoutProxyModel (QgsLayout *layout, QObject *parent=nullptr) | |
| Constructor for QgsLayoutProxyModelm, attached to the specified layout.  More... | |
| bool | allowEmptyItem () const | 
| Returns trueif the model includes the empty item choice.  More... | |
| QList< QgsLayoutItem * > | exceptedItemList () const | 
| Returns the list of specific items excluded from the model.  More... | |
| QgsLayoutItemRegistry::ItemType | filterType () const | 
| Returns the current item type filter, or QgsLayoutItemRegistry::LayoutItem if no item type filter is set.  More... | |
| QgsLayoutItem::Flags | itemFlags () const | 
| Returns the layout item flags used for filtering the available items.  More... | |
| QgsLayoutItem * | itemFromSourceIndex (const QModelIndex &sourceIndex) const | 
| Returns the QgsLayoutItem corresponding to an index from the source QgsLayoutModel model.  More... | |
| QgsLayout * | layout () | 
| Returns the associated layout.  More... | |
| void | setAllowEmptyItem (bool allowEmpty) | 
| Sets whether an optional empty layout item is present in the model.  More... | |
| void | setExceptedItemList (const QList< QgsLayoutItem * > &items) | 
| Sets a list of specific items to exclude from the model.  More... | |
| void | setFilterType (QgsLayoutItemRegistry::ItemType filter) | 
| Sets the item type filter.  More... | |
| void | setItemFlags (QgsLayoutItem::Flags flags) | 
| Sets layout item flags to use for filtering the available items.  More... | |
| QgsLayoutModel * | sourceLayerModel () const | 
| Returns the QgsLayoutModel used in this proxy model.  More... | |
| Protected Member Functions | |
| bool | filterAcceptsRow (int sourceRow, const QModelIndex &sourceParent) const override | 
| bool | lessThan (const QModelIndex &left, const QModelIndex &right) const override | 
Allows for filtering a QgsLayoutModel by item type.
Definition at line 306 of file qgslayoutmodel.h.
| QgsLayoutProxyModel::QgsLayoutProxyModel | ( | QgsLayout * | layout, | 
| QObject * | parent = nullptr | ||
| ) | 
Constructor for QgsLayoutProxyModelm, attached to the specified layout.
Definition at line 948 of file qgslayoutmodel.cpp.
| bool QgsLayoutProxyModel::allowEmptyItem | ( | ) | const | 
Returns true if the model includes the empty item choice. 
Definition at line 998 of file qgslayoutmodel.cpp.
| 
 | inline | 
Returns the list of specific items excluded from the model.
Definition at line 342 of file qgslayoutmodel.h.
| 
 | overrideprotected | 
Definition at line 1029 of file qgslayoutmodel.cpp.
| 
 | inline | 
Returns the current item type filter, or QgsLayoutItemRegistry::LayoutItem if no item type filter is set.
Definition at line 322 of file qgslayoutmodel.h.
| QgsLayoutItem::Flags QgsLayoutProxyModel::itemFlags | ( | ) | const | 
Returns the layout item flags used for filtering the available items.
Returns nullptr if no flag based filtering is occurring.
Definition at line 1009 of file qgslayoutmodel.cpp.
| QgsLayoutItem * QgsLayoutProxyModel::itemFromSourceIndex | ( | const QModelIndex & | sourceIndex | ) | const | 
Returns the QgsLayoutItem corresponding to an index from the source QgsLayoutModel model.
Definition at line 982 of file qgslayoutmodel.cpp.
| 
 | inline | 
| 
 | overrideprotected | 
Definition at line 961 of file qgslayoutmodel.cpp.
| void QgsLayoutProxyModel::setAllowEmptyItem | ( | bool | allowEmpty | ) | 
Sets whether an optional empty layout item is present in the model.
Definition at line 992 of file qgslayoutmodel.cpp.
| void QgsLayoutProxyModel::setExceptedItemList | ( | const QList< QgsLayoutItem * > & | items | ) | 
Sets a list of specific items to exclude from the model.
Definition at line 1020 of file qgslayoutmodel.cpp.
| void QgsLayoutProxyModel::setFilterType | ( | QgsLayoutItemRegistry::ItemType | filter | ) | 
Sets the item type filter.
Only matching item types will be shown. Set filter to QgsLayoutItemRegistry::LayoutItem to show all item types.
Definition at line 1014 of file qgslayoutmodel.cpp.
| void QgsLayoutProxyModel::setItemFlags | ( | QgsLayoutItem::Flags | flags | ) | 
Sets layout item flags to use for filtering the available items.
Set flags to nullptr to clear the flag based filtering.
Definition at line 1003 of file qgslayoutmodel.cpp.
| 
 | inline | 
Returns the QgsLayoutModel used in this proxy model.
Definition at line 347 of file qgslayoutmodel.h.