18 #ifndef QGSLAYOUTUNDOCOMMAND_H
19 #define QGSLAYOUTUNDOCOMMAND_H
21 #include <QUndoCommand>
23 #include <QDomDocument>
25 #include "qgis_core.h"
47 int id()
const override {
return mId; }
54 void saveBeforeState();
61 void saveAfterState();
68 QDomDocument
beforeState()
const {
return mBeforeState.cloneNode().toDocument(); }
75 QDomDocument
afterState()
const {
return mAfterState.cloneNode().toDocument(); }
80 virtual bool containsChange()
const;
91 virtual void saveState( QDomDocument &stateDoc )
const = 0;
100 virtual void restoreState( QDomDocument &stateDoc ) = 0;
105 void setAfterState(
const QDomDocument &stateDoc );
108 bool mFirstRun =
true;
113 QDomDocument mBeforeState;
116 QDomDocument mAfterState;
147 #endif // QGSLAYOUTUNDOCOMMAND_H