новые иконки в OpenBoard
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
OpenBoard/src/domain/UBGraphicsItemUndoCommand.h

40 lines
904 B

/*
* UBGraphicsItemUndoCommand.h
*
* Created on: Sep 16, 2008
* Author: luc
*/
#ifndef UBGRAPHICSITEMUNDOCOMMAND_H_
#define UBGRAPHICSITEMUNDOCOMMAND_H_
#include <QtGui>
class UBGraphicsScene;
class UBGraphicsItemUndoCommand : public QUndoCommand
{
public:
UBGraphicsItemUndoCommand(UBGraphicsScene* pScene, const QSet<QGraphicsItem*>& pRemovedItems,
const QSet<QGraphicsItem*>& pAddedItems);
UBGraphicsItemUndoCommand(UBGraphicsScene* pScene, QGraphicsItem* pRemovedItem,
QGraphicsItem* pAddedItem);
virtual ~UBGraphicsItemUndoCommand();
protected:
virtual void undo();
virtual void redo();
private:
UBGraphicsScene* mScene;
QSet<QGraphicsItem*> mRemovedItems;
QSet<QGraphicsItem*> mAddedItems;
bool mFirstRedo;
};
#endif /* UBGRAPHICSITEMUNDOCOMMAND_H_ */