22 : QUndoCommand( text, parent )
55 return !( mBeforeState.isNull() || mAfterState.isNull() || mBeforeState.toString() == mAfterState.toString() );
60 mAfterState = stateDoc;
virtual void restoreState(QDomDocument &stateDoc)=0
Restores the state of the object from the specified stateDoc.
void saveBeforeState()
Saves current layout state as before state.
virtual void saveState(QDomDocument &stateDoc) const =0
Saves the state of the object to the specified stateDoc.
QgsAbstractLayoutUndoCommand(const QString &text, int id=0, QUndoCommand *parent=nullptr)
Constructor for QgsLayoutUndoCommand.
virtual bool containsChange() const
Returns true if both the before and after states are valid and different.
void setAfterState(const QDomDocument &stateDoc)
Manually sets the after state for the command.
void saveAfterState()
Saves current layout state as after state.
bool mFirstRun
Flag to prevent the first redo() if the command is pushed to the undo stack.