QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
22 : QUndoCommand( text, parent )
55 return !( mBeforeState.isNull() || mAfterState.isNull() || mBeforeState.toString() == mAfterState.toString() );
60 mAfterState = stateDoc;
virtual void saveState(QDomDocument &stateDoc) const =0
Saves the state of the object to the specified stateDoc.
void saveAfterState()
Saves current layout state as after state.
void saveBeforeState()
Saves current layout state as before state.
virtual void restoreState(QDomDocument &stateDoc)=0
Restores the state of the object from the specified stateDoc.
QgsAbstractLayoutUndoCommand(const QString &text, int id=0, QUndoCommand *parent=nullptr)
Constructor for QgsLayoutUndoCommand.
bool mFirstRun
Flag to prevent the first redo() if the command is pushed to the undo stack.
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.