18 #ifndef QGSCOMPOSERITEMCOMMAND_H
19 #define QGSCOMPOSERITEMCOMMAND_H
21 #include <QUndoCommand>
22 #include <QDomDocument>
39 void savePreviousState();
41 void saveAfterState();
43 QDomDocument
previousState()
const {
return mPreviousState.cloneNode().toDocument(); }
44 QDomDocument
afterState()
const {
return mAfterState.cloneNode().toDocument(); }
47 bool containsChange()
const;
62 void saveState( QDomDocument& stateDoc )
const;
63 void restoreState( QDomDocument& stateDoc )
const;
128 bool mergeWith(
const QUndoCommand * command );
129 int id()
const {
return (
int )mContext; }
135 #endif // QGSCOMPOSERITEMCOMMAND_H
A item that forms part of a map composition.
A composer command that merges together with other commands having the same context (=id)...
QDomDocument previousState() const
bool mFirstRun
Flag to prevent the first redo() if the command is pushed to the undo stack.
Undo command to undo/redo all composer item related changes.
QDomDocument mAfterState
XML containing the state after executing the command.
QgsComposerItem * mItem
Target item of the command.
const QgsComposerItem * item() const
QDomDocument afterState() const
QDomDocument mPreviousState
XML that saves the state before executing the command.