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