8 * Undo / redo functionality. The internal undo list consists of
12 * @author Andrew Mustun
20 void addUndoCycle(UndoCycle * i);
25 virtual UndoCycle * getUndoCycle();
26 virtual UndoCycle * getRedoCycle();
28 virtual int countUndoCycles();
29 virtual int countRedoCycles();
31 virtual void startUndoCycle();
32 virtual void addUndoable(Undoable * u);
33 virtual void endUndoCycle();
36 * Must be overwritten by the implementing class and delete
37 * the given Undoable (unrecoverable). This method is called
38 * for Undoables that are no longer in the undo buffer.
40 virtual void removeUndoable(Undoable * u) = 0;
42 friend std::ostream & operator<<(std::ostream & os, Undo & a);
45 static bool test(void);
49 //! List of undo list items. every item is something that can be undone.
50 // Q3PtrList<UndoCycle> undoList;
51 QList<UndoCycle *> undoList;
54 * Index that points to the current position in the undo list.
55 * The item it points on will be undone the next time undo is called.
56 * The item after will be redone (if there is an item) when redo
64 UndoCycle * currentCycle;
69 * Stub for testing the Undo class.
71 class UndoStub : public Undo
73 virtual void removeUndoable(Undoable * u)