1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
/** A composer command class for adding / removing composer items. If mState == Removed, the command owns the item*/
class QgsAddRemoveItemCommand: QObject, QUndoCommand
{
%TypeHeaderCode
#include "qgsaddremoveitemcommand.h"
%End
public:
enum State
{
Added,
Removed
};
QgsAddRemoveItemCommand( State s, QgsComposerItem* item, QgsComposition* c, const QString& text, QUndoCommand* parent /TransferThis/ = 0 );
~QgsAddRemoveItemCommand();
void redo();
void undo();
signals:
void itemAdded( QgsComposerItem* item );
void itemRemoved( QgsComposerItem* item );
};
|