28 , mMultiFrame( nullptr )
107 source->
writeXML( documentElement, stateDoc );
147 if ( !c || thisItem != c->
item() )
QgsComposerItemCommand(QgsComposerItem *item, const QString &text, QUndoCommand *parent=nullptr)
virtual bool writeXML(QDomElement &elem, QDomDocument &doc) const
Stores item state in DOM element.
QDomNode appendChild(const QDomNode &newChild)
QgsComposerMergeCommand(Context c, QgsComposerItem *item, const QString &text)
QString toString(int indent) const
A item that forms part of a map composition.
void savePreviousState()
Saves current item state as previous state.
QDomElement documentElement() const
~QgsComposerMergeCommand()
void undo() override
Reverses the command.
void saveState(QDomDocument &stateDoc) const
void restoreState(QDomDocument &stateDoc) const
QDomElement toElement() const
bool containsChange() const
Returns true if previous state and after state are valid and different.
int frameCount() const
Returns the number of frames associated with this multiframe.
virtual ~QgsComposerItemCommand()
Frame item for a composer multiframe item.
bool mergeWith(const QUndoCommand *command) override
void saveAfterState()
Saves current item state as after state.
bool mFirstRun
Flag to prevent the first redo() if the command is pushed to the undo stack.
QDomNode firstChild() const
Undo command to undo/redo all composer item related changes.
QDomDocument mAfterState
XML containing the state after executing the command.
virtual bool readXML(const QDomElement &itemElem, const QDomDocument &doc)
Sets item state from DOM element.
QgsComposerItem * mItem
Target item of the command.
QgsComposerMultiFrame * mMultiFrame
Parameters for frame items.
static QgsProject * instance()
access to canonical QgsProject instance
QDomDocument afterState() const
int frameIndex(QgsComposerFrame *frame) const
Returns the index of a frame within the multiframe.
void redo() override
Replays the command.
QgsComposerFrame * frame(int i) const
Returns a child frame from the multiframe.
QDomElement createElement(const QString &tagName)
QgsComposerMultiFrame * multiFrame() const
Returns the parent multiframe for the frame.
QgsComposerItem * item() const
Returns the target item the command applies to.
QDomDocument mPreviousState
XML that saves the state before executing the command.