QGIS API Documentation
2.8.2-Wien
|
Undo command to undo/redo all composer item related changes. More...
#include <qgscomposeritemcommand.h>
Public Member Functions | |
QgsComposerItemCommand (QgsComposerItem *item, const QString &text, QUndoCommand *parent=0) | |
virtual | ~QgsComposerItemCommand () |
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. | |
QDomDocument | previousState () const |
void | redo () override |
Replays the command. | |
void | saveAfterState () |
Saves current item state as after state. | |
void | savePreviousState () |
Saves current item state as previous state. | |
void | undo () override |
Reverses the command. |
Protected Member Functions | |
void | restoreState (QDomDocument &stateDoc) const |
void | saveState (QDomDocument &stateDoc) const |
Protected Attributes | |
QDomDocument | mAfterState |
XML containing the state after executing the command. | |
bool | mFirstRun |
Flag to prevent the first redo() if the command is pushed to the undo stack. | |
int | mFrameNumber |
QgsComposerItem * | mItem |
Target item of the command. | |
QgsComposerMultiFrame * | mMultiFrame |
Parameters for frame items. | |
QDomDocument | mPreviousState |
XML that saves the state before executing the command. |
Undo command to undo/redo all composer item related changes.
Definition at line 28 of file qgscomposeritemcommand.h.
QgsComposerItemCommand::QgsComposerItemCommand | ( | QgsComposerItem * | item, |
const QString & | text, | ||
QUndoCommand * | parent = 0 |
||
) |
Definition at line 25 of file qgscomposeritemcommand.cpp.
|
virtual |
Definition at line 42 of file qgscomposeritemcommand.cpp.
|
inline |
Definition at line 45 of file qgscomposeritemcommand.h.
bool QgsComposerItemCommand::containsChange | ( | ) | const |
Returns true if previous state and after state are valid and different.
Definition at line 61 of file qgscomposeritemcommand.cpp.
QgsComposerItem * QgsComposerItemCommand::item | ( | ) | const |
Returns the target item the command applies to.
Definition at line 66 of file qgscomposeritemcommand.cpp.
|
inline |
Definition at line 44 of file qgscomposeritemcommand.h.
|
override |
Replays the command.
Definition at line 51 of file qgscomposeritemcommand.cpp.
|
protected |
Definition at line 111 of file qgscomposeritemcommand.cpp.
void QgsComposerItemCommand::saveAfterState | ( | ) |
Saves current item state as after state.
Definition at line 92 of file qgscomposeritemcommand.cpp.
void QgsComposerItemCommand::savePreviousState | ( | ) |
Saves current item state as previous state.
Definition at line 87 of file qgscomposeritemcommand.cpp.
|
protected |
Definition at line 97 of file qgscomposeritemcommand.cpp.
|
override |
Reverses the command.
Definition at line 46 of file qgscomposeritemcommand.cpp.
|
protected |
XML containing the state after executing the command.
Definition at line 61 of file qgscomposeritemcommand.h.
|
protected |
Flag to prevent the first redo() if the command is pushed to the undo stack.
Definition at line 69 of file qgscomposeritemcommand.h.
|
protected |
Definition at line 66 of file qgscomposeritemcommand.h.
|
protected |
Target item of the command.
Definition at line 57 of file qgscomposeritemcommand.h.
|
protected |
Parameters for frame items.
Parent multiframe
Definition at line 65 of file qgscomposeritemcommand.h.
|
protected |
XML that saves the state before executing the command.
Definition at line 59 of file qgscomposeritemcommand.h.