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