Class: QgsLayoutManagerModel¶
List model representing the print layouts and reports available in a layout manager.
Added in version 3.8.
Class Hierarchy¶
Base classes¶
Base class for list models representing the objects available in a |
|
Enums
Custom model roles. |
|
alias of |
Methods
Returns |
|
Returns the model index corresponding to a layout. |
|
Returns the layout at the corresponding index. |
|
Sets whether an optional empty layout ("not set") option is present in the model. |
- class qgis.core.QgsLayoutManagerModel[source]¶
Bases:
QgsProjectStoredObjectManagerModelBase
- __init__(manager: QgsLayoutManager | None, parent: QObject | None = None)
Constructor for QgsLayoutManagerModel, showing the layouts from the specified
manager
.- Parameters:
manager (Optional[QgsLayoutManager])
parent (Optional[QObject] = None)
- class CustomRole(*values)¶
Bases:
IntEnum
Custom model roles.
Note
Prior to QGIS 3.36 this was available as QgsLayoutManagerModel.Role
Added in version 3.36.
Layout
: Layout objectAvailable as
QgsLayoutManagerModel.LayoutRole
in older QGIS releases.
- Role¶
alias of
CustomRole
- allowEmptyLayout(self) bool [source]¶
Returns
True
if the model allows the empty layout (“not set”) choice.See also
- Return type:
bool
- indexFromLayout(self, layout: QgsMasterLayoutInterface | None) QModelIndex [source]¶
Returns the model index corresponding to a
layout
.See also
- Parameters:
layout (Optional[QgsMasterLayoutInterface])
- Return type:
QModelIndex
- layoutFromIndex(self, index: QModelIndex) QgsMasterLayoutInterface | None [source]¶
Returns the layout at the corresponding
index
.See also
- Parameters:
index (QModelIndex)
- Return type:
Optional[QgsMasterLayoutInterface]