Class: QgsLayoutUndoObjectInterface¶
- class qgis.core.QgsLayoutUndoObjectInterface¶
Bases:
sip.wrapper
Interface for layout objects which support undo/redo commands.
- createCommand(self, text: str | None, id: int = 0, parent: QUndoCommand | None = None) QgsAbstractLayoutUndoCommand | None ¶
Creates a new layout undo command with the specified
text
andparent
.The
id
argument can be used to specify an id number for the source event - this is used to determine whether QUndoCommand command compression can apply to the command.- Parameters:
text (Optional[str])
id (int = 0)
parent (Optional[QUndoCommand] = None)
- Return type:
Optional[QgsAbstractLayoutUndoCommand]