]> Shamusworld >> Repos - architektonas/blob - src/base/rs_undocycle.h
Scrubbed out all references to RS2::qtToRsButton(). Gone!
[architektonas] / src / base / rs_undocycle.h
1 #ifndef RS_UNDOLISTITEM_H
2 #define RS_UNDOLISTITEM_H
3
4 #include <iostream>
5 #include <QtCore>
6
7 class RS_Undoable;
8
9 /**
10  * An Undo Cycle represents an action that was triggered and can
11  * be undone. It stores all the pointers to the Undoables affected by
12  * the action. Undoables are entities in a container that can be
13  * created and deleted.
14  *
15  * Undo Cycles are stored within classes derrived from RS_Undo.
16  *
17  * @see RS_Undoable
18  * @see RS_Undo
19  *
20  * @author Andrew Mustun
21  */
22 class RS_UndoCycle
23 {
24         friend class RS_Undo;
25
26         public:
27                 RS_UndoCycle(/*RS2::UndoType type*/);
28                 void addUndoable(RS_Undoable * u);
29                 void removeUndoable(RS_Undoable * u);
30                 RS_Undoable * getFirstUndoable();
31                 RS_Undoable * getNextUndoable();
32                 friend std::ostream & operator<<(std::ostream & os, RS_UndoCycle & i);
33
34         private:
35                 //! Undo type:
36                 //RS2::UndoType type;
37                 //! List of entity id's that were affected by this action
38 //              Q3PtrList<RS_Undoable> undoables;
39                 QList<RS_Undoable *> undoables;
40                 QListIterator<RS_Undoable *> undoableIterator;
41 };
42
43 #endif