QGIS API Documentation  master-3f58142
QgsAddRemoveItemCommand Class Reference

A composer command class for adding / removing composer items. More...

#include <qgsaddremoveitemcommand.h>

+ Collaboration diagram for QgsAddRemoveItemCommand:

List of all members.

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

QgsCompositionmComposition
bool mFirstRun
QgsComposerItemmItem
State mState

Detailed Description

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.


Member Enumeration Documentation

Enumerator:
Added 
Removed 

Definition at line 32 of file qgsaddremoveitemcommand.h.


Constructor & Destructor Documentation

QgsAddRemoveItemCommand::QgsAddRemoveItemCommand ( State  s,
QgsComposerItem item,
QgsComposition c,
const QString &  text,
QUndoCommand *  parent = 0 
)

Definition at line 22 of file qgsaddremoveitemcommand.cpp.


Member Function Documentation

Referenced by switchState().

Referenced by switchState().

Definition at line 35 of file qgsaddremoveitemcommand.cpp.

References mFirstRun, and switchState().

Definition at line 55 of file qgsaddremoveitemcommand.cpp.

References Added, itemAdded(), itemRemoved(), mComposition, mItem, mState, and Removed.

Referenced by redo(), and undo().

Definition at line 45 of file qgsaddremoveitemcommand.cpp.

References mFirstRun, and switchState().


Member Data Documentation

Definition at line 52 of file qgsaddremoveitemcommand.h.

Referenced by redo(), and undo().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines