|
QGIS API Documentation
2.4.0-Chugiak
|
A composer command class for adding / removing composer items. More...
#include <qgsaddremoveitemcommand.h>


Public Types | |
| enum | State { Added = 0, Removed } |
Signals | |
| void | itemAdded (QgsComposerItem *item) |
| void | itemRemoved (QgsComposerItem *item) |
Public Member Functions | |
| QgsAddRemoveItemCommand (State s, QgsComposerItem *item, QgsComposition *c, const QString &text, QUndoCommand *parent=0) | |
| ~QgsAddRemoveItemCommand () | |
| void | redo () |
| void | undo () |
Private Member Functions | |
| void | switchState () |
Private Attributes | |
| QgsComposerItem * | mItem |
| QgsComposition * | mComposition |
| State | mState |
| bool | mFirstRun |
A composer command class for adding / removing composer items.
If mState == Removed, the command owns the item
Definition at line 26 of file qgsaddremoveitemcommand.h.
| Enumerator | |
|---|---|
| Added | |
| Removed | |
Definition at line 32 of file qgsaddremoveitemcommand.h.
| QgsAddRemoveItemCommand::QgsAddRemoveItemCommand | ( | State | s, |
| QgsComposerItem * | item, | ||
| QgsComposition * | c, | ||
| const QString & | text, | ||
| QUndoCommand * | parent = 0 |
||
| ) |
Definition at line 23 of file qgsaddremoveitemcommand.cpp.
| QgsAddRemoveItemCommand::~QgsAddRemoveItemCommand | ( | ) |
Definition at line 28 of file qgsaddremoveitemcommand.cpp.
|
signal |
Referenced by switchState().
|
signal |
Referenced by switchState().
| void QgsAddRemoveItemCommand::redo | ( | ) |
Definition at line 36 of file qgsaddremoveitemcommand.cpp.
References mFirstRun, and switchState().
|
private |
Definition at line 56 of file qgsaddremoveitemcommand.cpp.
References Added, QgsProject::dirty(), QgsProject::instance(), itemAdded(), itemRemoved(), mComposition, mItem, mState, and Removed.
| void QgsAddRemoveItemCommand::undo | ( | ) |
Definition at line 46 of file qgsaddremoveitemcommand.cpp.
References mFirstRun, and switchState().
|
private |
Definition at line 50 of file qgsaddremoveitemcommand.h.
Referenced by switchState().
|
private |
Definition at line 52 of file qgsaddremoveitemcommand.h.
|
private |
Definition at line 49 of file qgsaddremoveitemcommand.h.
Referenced by switchState(), and ~QgsAddRemoveItemCommand().
|
private |
Definition at line 51 of file qgsaddremoveitemcommand.h.
Referenced by switchState(), and ~QgsAddRemoveItemCommand().
1.8.7