/**
* Undo / redo functionality. The internal undo list consists of
- * RS_UndoCycle entries.
+ * UndoCycle entries.
*
- * @see RS_UndoCycle
+ * @see UndoCycle
* @author Andrew Mustun
*/
-class RS_Undo
+class Undo
{
public:
- RS_Undo();
- virtual ~RS_Undo();
+ Undo();
+ virtual ~Undo();
- void addUndoCycle(RS_UndoCycle * i);
+ void addUndoCycle(UndoCycle * i);
virtual void undo();
virtual void redo();
- virtual RS_UndoCycle * getUndoCycle();
- virtual RS_UndoCycle * getRedoCycle();
+ virtual UndoCycle * getUndoCycle();
+ virtual UndoCycle * getRedoCycle();
virtual int countUndoCycles();
virtual int countRedoCycles();
virtual void startUndoCycle();
- virtual void addUndoable(RS_Undoable * u);
+ virtual void addUndoable(Undoable * u);
virtual void endUndoCycle();
/**
* the given Undoable (unrecoverable). This method is called
* for Undoables that are no longer in the undo buffer.
*/
- virtual void removeUndoable(RS_Undoable * u) = 0;
+ virtual void removeUndoable(Undoable * u) = 0;
- friend std::ostream & operator<<(std::ostream & os, RS_Undo & a);
+ friend std::ostream & operator<<(std::ostream & os, Undo & a);
#ifdef RS_TEST
static bool test(void);
protected:
//! List of undo list items. every item is something that can be undone.
-// Q3PtrList<RS_UndoCycle> undoList;
- QList<RS_UndoCycle *> undoList;
+// Q3PtrList<UndoCycle> undoList;
+ QList<UndoCycle *> undoList;
/**
* Index that points to the current position in the undo list.
/**
* Current undo cycle.
*/
- RS_UndoCycle * currentCycle;
+ UndoCycle * currentCycle;
};
#ifdef RS_TEST
/**
- * Stub for testing the RS_Undo class.
+ * Stub for testing the Undo class.
*/
-class RS_UndoStub : public RS_Undo
+class UndoStub : public Undo
{
- virtual void removeUndoable(RS_Undoable * u)
+ virtual void removeUndoable(Undoable * u)
{
delete u;
u = NULL;