QGIS API Documentation
2.6.0-Brighton
|
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 () | |
bool | mergeWith (const QUndoCommand *command) |
int | id () const |
Public Member Functions inherited from QgsComposerItemCommand | |
QgsComposerItemCommand (QgsComposerItem *item, const QString &text, QUndoCommand *parent=0) | |
virtual | ~QgsComposerItemCommand () |
void | undo () |
Reverses the command. | |
void | redo () |
Replays the command. | |
void | savePreviousState () |
Saves current item state as previous state. | |
void | saveAfterState () |
Saves current item state as after state. | |
QDomDocument | previousState () const |
QDomDocument | afterState () const |
bool | containsChange () const |
Returns true if previous state and after state are valid and different. | |
QgsComposerItem * | item () const |
Returns the target item the command applies to. |
Additional Inherited Members | |
Protected Member Functions inherited from QgsComposerItemCommand | |
void | saveState (QDomDocument &stateDoc) const |
void | restoreState (QDomDocument &stateDoc) const |
Protected Attributes inherited from QgsComposerItemCommand | |
QgsComposerItem * | mItem |
Target item of the command. | |
QDomDocument | mPreviousState |
XML that saves the state before executing the command. | |
QDomDocument | mAfterState |
XML containing the state after executing the command. | |
QgsComposerMultiFrame * | mMultiFrame |
Parameters for frame items. | |
int | mFrameNumber |
bool | mFirstRun |
Flag to prevent the first redo() if the command is pushed to the undo stack. |
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
QgsComposerMergeCommand::QgsComposerMergeCommand | ( | Context | c, |
QgsComposerItem * | item, | ||
const QString & | text | ||
) |
QgsComposerMergeCommand::~QgsComposerMergeCommand | ( | ) |
|
inline |
bool QgsComposerMergeCommand::mergeWith | ( | const QUndoCommand * | command | ) |