QGIS API Documentation
2.18.21-Las Palmas (9fba24a)
|
A composer command that merges together with other commands having the same context (=id). More...
#include <qgscomposeritemcommand.h>
Public Member Functions | |
QgsComposerMergeCommand (Context c, QgsComposerItem *item, const QString &text) | |
~QgsComposerMergeCommand () | |
int | id () const override |
bool | mergeWith (const QUndoCommand *command) override |
Public Member Functions inherited from QgsComposerItemCommand | |
QgsComposerItemCommand (QgsComposerItem *item, const QString &text, QUndoCommand *parent=nullptr) | |
virtual | ~QgsComposerItemCommand () |
QDomDocument | afterState () const |
bool | containsChange () const |
Returns true if previous state and after state are valid and different. More... | |
QgsComposerItem * | item () const |
Returns the target item the command applies to. More... | |
QDomDocument | previousState () const |
void | redo () override |
Replays the command. More... | |
void | saveAfterState () |
Saves current item state as after state. More... | |
void | savePreviousState () |
Saves current item state as previous state. More... | |
void | undo () override |
Reverses the command. More... | |
Public Member Functions inherited from QUndoCommand | |
QUndoCommand (QUndoCommand *parent) | |
QUndoCommand (const QString &text, QUndoCommand *parent) | |
virtual | ~QUndoCommand () |
QString | actionText () const |
const QUndoCommand * | child (int index) const |
int | childCount () const |
void | setText (const QString &text) |
QString | text () const |
Additional Inherited Members | |
Protected Member Functions inherited from QgsComposerItemCommand | |
void | restoreState (QDomDocument &stateDoc) const |
void | saveState (QDomDocument &stateDoc) const |
Protected Attributes inherited from QgsComposerItemCommand | |
QDomDocument | mAfterState |
XML containing the state after executing the command. More... | |
bool | mFirstRun |
Flag to prevent the first redo() if the command is pushed to the undo stack. More... | |
int | mFrameNumber |
QgsComposerItem * | mItem |
Target item of the command. More... | |
QgsComposerMultiFrame * | mMultiFrame |
Parameters for frame items. More... | |
QDomDocument | mPreviousState |
XML that saves the state before executing the command. More... | |
A composer command that merges together with other commands having the same context (=id).
Keeps the oldest previous state and uses the newest after state. The purpose is to avoid too many micro changes in the history
Definition at line 81 of file qgscomposeritemcommand.h.
Definition at line 84 of file qgscomposeritemcommand.h.
QgsComposerMergeCommand::QgsComposerMergeCommand | ( | Context | c, |
QgsComposerItem * | item, | ||
const QString & | text | ||
) |
Definition at line 128 of file qgscomposeritemcommand.cpp.
QgsComposerMergeCommand::~QgsComposerMergeCommand | ( | ) |
Definition at line 134 of file qgscomposeritemcommand.cpp.
|
inlineoverridevirtual |
Reimplemented from QUndoCommand.
Definition at line 145 of file qgscomposeritemcommand.h.
|
overridevirtual |
Reimplemented from QUndoCommand.
Definition at line 138 of file qgscomposeritemcommand.cpp.