2016-02-14 03:50:23 +01:00
|
|
|
/** A composer command class for adding / removing composer items. If mState == Removed, the command owns the item*/
|
2010-12-02 09:55:42 +00:00
|
|
|
class QgsAddRemoveItemCommand: QObject, QUndoCommand
|
|
|
|
{
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsaddremoveitemcommand.h"
|
|
|
|
%End
|
|
|
|
public:
|
|
|
|
|
|
|
|
enum State
|
|
|
|
{
|
2014-06-02 21:00:51 +02:00
|
|
|
Added,
|
2010-12-02 09:55:42 +00:00
|
|
|
Removed
|
|
|
|
};
|
|
|
|
|
2014-09-21 21:05:29 +10:00
|
|
|
QgsAddRemoveItemCommand( State s, QgsComposerItem* item, QgsComposition* c, const QString& text, QUndoCommand* parent /TransferThis/ = 0 );
|
2010-12-02 09:55:42 +00:00
|
|
|
~QgsAddRemoveItemCommand();
|
|
|
|
|
|
|
|
void redo();
|
|
|
|
void undo();
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void itemAdded( QgsComposerItem* item );
|
|
|
|
void itemRemoved( QgsComposerItem* item );
|
|
|
|
};
|