Class: QgsLayoutProxyModel¶
-
class
qgis.core.
QgsLayoutProxyModel
(layout: QgsLayout, parent: QObject = None)¶ Bases:
PyQt5.QtCore.QSortFilterProxyModel
Constructor for QgsLayoutProxyModelm, attached to the specified
layout
.Allows for filtering a QgsLayoutModel by item type.
New in version 3.0: Enums
Methods
Returns
True
if the model includes the empty item choice.Returns the list of specific items excluded from the model.
Returns the current item type filter, or QgsLayoutItemRegistry.LayoutItem if no item type filter is set.
Returns the QgsLayoutItem corresponding to an index from the source QgsLayoutModel model.
Returns the associated layout.
Sets whether an optional empty layout item is present in the model.
Sets a list of specific
items
to exclude from the model.Sets the item type
filter
.Returns the QgsLayoutModel used in this proxy model.
Signals
Attributes
-
allowEmptyItem
(self) → bool¶ Returns
True
if the model includes the empty item choice.See also
New in version 3.8.
-
beginInsertColumns
()¶
-
beginInsertRows
()¶
-
beginMoveColumns
()¶
-
beginMoveRows
()¶
-
beginRemoveColumns
()¶
-
beginRemoveRows
()¶
-
beginResetModel
()¶
-
changePersistentIndex
()¶
-
changePersistentIndexList
()¶
-
childEvent
()¶
-
connectNotify
()¶
-
createIndex
()¶
-
customEvent
()¶
-
decodeData
()¶
-
disconnectNotify
()¶
-
encodeData
()¶
-
endInsertColumns
()¶
-
endInsertRows
()¶
-
endMoveColumns
()¶
-
endMoveRows
()¶
-
endRemoveColumns
()¶
-
endRemoveRows
()¶
-
endResetModel
()¶
-
exceptedItemList
(self) → List[QgsLayoutItem]¶ Returns the list of specific items excluded from the model.
See also
-
filterAcceptsColumn
()¶
-
filterAcceptsRow
(self, sourceRow: int, sourceParent: QModelIndex) → bool¶
-
filterType
(self) → QgsLayoutItemRegistry.ItemType¶ Returns the current item type filter, or QgsLayoutItemRegistry.LayoutItem if no item type filter is set.
See also
-
invalidateFilter
()¶
-
isSignalConnected
()¶
-
itemFromSourceIndex
(self, sourceIndex: QModelIndex) → QgsLayoutItem¶ Returns the QgsLayoutItem corresponding to an index from the source QgsLayoutModel model.
-
layout
(self) → QgsLayout¶ Returns the associated layout.
New in version 3.8.
-
lessThan
(self, left: QModelIndex, right: QModelIndex) → bool¶
-
persistentIndexList
()¶
-
receivers
()¶
-
resetInternalData
()¶
-
sender
()¶
-
senderSignalIndex
()¶
-
setAllowEmptyItem
(self, allowEmpty: bool)¶ Sets whether an optional empty layout item is present in the model.
See also
New in version 3.8.
-
setExceptedItemList
(self, items: Iterable[QgsLayoutItem])¶ Sets a list of specific
items
to exclude from the model.See also
-
setFilterType
(self, filter: QgsLayoutItemRegistry.ItemType)¶ Sets the item type
filter
. Only matching item types will be shown. Setfilter
to QgsLayoutItemRegistry.LayoutItem to show all item types.See also
-
sourceLayerModel
(self) → QgsLayoutModel¶ Returns the QgsLayoutModel used in this proxy model.
-
timerEvent
()¶
-