Class: QgsLayoutManagerModel¶
- class qgis.core.QgsLayoutManagerModel¶
Bases:
PyQt5.QtCore.QAbstractListModel
List model representing the print layouts and reports available in a layout manager.
Added in version 3.8.
QgsLayoutManagerModel(manager: Optional[QgsLayoutManager], parent: Optional[QObject] = None) Constructor for
QgsLayoutManagerModel
, showing the layouts from the specifiedmanager
.Enums
Bases:
enum.IntEnum
alias of
CustomRole
Methods
Returns
True
if the model allows the empty layout ("not set") choice.- param index:
- param index:
Returns the model index corresponding to a
layout
.Returns the layout at the corresponding
index
.- param parent:
Sets whether an optional empty layout ("not set") option is present in the model.
- param index:
- class CustomRole(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
enum.IntEnum
Custom model roles.
Note
Prior to QGIS 3.36 this was available as QgsLayoutManagerModel.Role
Added in version 3.36.
LayoutRole
: Layout object
- baseClass¶
alias of
QgsLayoutManagerModel
- Role¶
alias of
CustomRole
- allowEmptyLayout(self) bool ¶
Returns
True
if the model allows the empty layout (“not set”) choice.See also
- Return type:
bool
- beginInsertColumns(self, parent: QModelIndex, first: int, last: int)¶
- beginInsertRows(self, parent: QModelIndex, first: int, last: int)¶
- beginMoveColumns(self, sourceParent: QModelIndex, sourceFirst: int, sourceLast: int, destinationParent: QModelIndex, destinationColumn: int) bool ¶
- beginMoveRows(self, sourceParent: QModelIndex, sourceFirst: int, sourceLast: int, destinationParent: QModelIndex, destinationRow: int) bool ¶
- beginRemoveColumns(self, parent: QModelIndex, first: int, last: int)¶
- beginRemoveRows(self, parent: QModelIndex, first: int, last: int)¶
- beginResetModel(self)¶
- changePersistentIndex(self, from_: QModelIndex, to: QModelIndex)¶
- changePersistentIndexList(self, from_: Iterable[QModelIndex], to: Iterable[QModelIndex])¶
- childEvent(self, a0: QChildEvent | None)¶
- connectNotify(self, signal: QMetaMethod)¶
- createIndex(self, row: int, column: int, object: Any = None) QModelIndex ¶
- customEvent(self, a0: QEvent | None)¶
- data(self, index: QModelIndex, role: int) Any ¶
- Parameters:
index (QModelIndex)
role (int)
- Return type:
Any
- decodeData(self, row: int, column: int, parent: QModelIndex, stream: QDataStream) bool ¶
- disconnectNotify(self, signal: QMetaMethod)¶
- encodeData(self, indexes: Iterable[QModelIndex], stream: QDataStream)¶
- endInsertColumns(self)¶
- endInsertRows(self)¶
- endMoveColumns(self)¶
- endMoveRows(self)¶
- endRemoveColumns(self)¶
- endRemoveRows(self)¶
- endResetModel(self)¶
- flags(self, index: QModelIndex) Qt.ItemFlags ¶
- Parameters:
index (QModelIndex)
- Return type:
Qt.ItemFlags
- indexFromLayout(self, layout: QgsMasterLayoutInterface | None) QModelIndex ¶
Returns the model index corresponding to a
layout
.See also
- Parameters:
layout (Optional[QgsMasterLayoutInterface])
- Return type:
QModelIndex
- isSignalConnected(self, signal: QMetaMethod) bool ¶
- layoutFromIndex(self, index: QModelIndex) QgsMasterLayoutInterface | None ¶
Returns the layout at the corresponding
index
.See also
- Parameters:
index (QModelIndex)
- Return type:
Optional[QgsMasterLayoutInterface]
- persistentIndexList(self) List[QModelIndex] ¶
- receivers(self, signal: PYQT_SIGNAL) int ¶
- resetInternalData(self)¶
- rowCount(self, parent: QModelIndex) int ¶
- Parameters:
parent (QModelIndex)
- Return type:
int
- sender(self) QObject | None ¶
- senderSignalIndex(self) int ¶
- setAllowEmptyLayout(self, allowEmpty: bool)¶
Sets whether an optional empty layout (“not set”) option is present in the model.
See also
- Parameters:
allowEmpty (bool)
- setData(self, index: QModelIndex, value: Any, role: int = Qt.EditRole) bool ¶
- Parameters:
index (QModelIndex)
value (Any)
role (int = Qt.EditRole)
- Return type:
bool
- timerEvent(self, a0: QTimerEvent | None)¶