Class: QgsLayoutUndoObjectInterface

class qgis.core.QgsLayoutUndoObjectInterface

Bases: sip.wrapper

Interface for layout objects which support undo/redo commands.

New in version 3.0:

Methods

createCommand

Creates a new layout undo command with the specified text and parent.

createCommand(self, text: str, id: int = 0, parent: QUndoCommand = None) QgsAbstractLayoutUndoCommand

Creates a new layout undo command with the specified text and parent.

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 (str) –

  • id (int = 0) –

  • parent (QUndoCommand = None) –

Return type:

QgsAbstractLayoutUndoCommand