Changeset View
Changeset View
Standalone View
Standalone View
libs/command/kis_undo_stores.h
- This file was moved from libs/image/kis_undo_stores.h.
Show All 24 Lines | |||||
25 | class KUndo2MagicString; | 25 | class KUndo2MagicString; | ||
26 | 26 | | |||
27 | 27 | | |||
28 | /** | 28 | /** | ||
29 | * KisSurrogateUndoAdapter -- saves commands directly to the | 29 | * KisSurrogateUndoAdapter -- saves commands directly to the | ||
30 | * internal stack. Used for wrapping around legacy code into | 30 | * internal stack. Used for wrapping around legacy code into | ||
31 | * a single command. | 31 | * a single command. | ||
32 | */ | 32 | */ | ||
33 | class KRITAIMAGE_EXPORT KisSurrogateUndoStore : public KisUndoStore | 33 | class KRITACOMMAND_EXPORT KisSurrogateUndoStore : public KisUndoStore | ||
34 | { | 34 | { | ||
35 | public: | 35 | public: | ||
36 | KisSurrogateUndoStore(); | 36 | KisSurrogateUndoStore(); | ||
37 | ~KisSurrogateUndoStore(); | 37 | ~KisSurrogateUndoStore(); | ||
38 | 38 | | |||
39 | const KUndo2Command* presentCommand(); | 39 | const KUndo2Command* presentCommand(); | ||
40 | void undoLastCommand(); | 40 | void undoLastCommand(); | ||
41 | void addCommand(KUndo2Command *cmd); | 41 | void addCommand(KUndo2Command *cmd); | ||
Show All 13 Lines | |||||
55 | private: | 55 | private: | ||
56 | KUndo2Stack *m_undoStack; | 56 | KUndo2Stack *m_undoStack; | ||
57 | }; | 57 | }; | ||
58 | 58 | | |||
59 | /** | 59 | /** | ||
60 | * @brief The KisDumbUndoStore class doesn't actually save commands, | 60 | * @brief The KisDumbUndoStore class doesn't actually save commands, | ||
61 | * so you cannot undo or redo! | 61 | * so you cannot undo or redo! | ||
62 | */ | 62 | */ | ||
63 | class KRITAIMAGE_EXPORT KisDumbUndoStore : public KisUndoStore | 63 | class KRITACOMMAND_EXPORT KisDumbUndoStore : public KisUndoStore | ||
64 | { | 64 | { | ||
65 | public: | 65 | public: | ||
66 | const KUndo2Command* presentCommand(); | 66 | const KUndo2Command* presentCommand(); | ||
67 | void undoLastCommand(); | 67 | void undoLastCommand(); | ||
68 | void addCommand(KUndo2Command *cmd); | 68 | void addCommand(KUndo2Command *cmd); | ||
69 | void beginMacro(const KUndo2MagicString& macroName); | 69 | void beginMacro(const KUndo2MagicString& macroName); | ||
70 | void endMacro(); | 70 | void endMacro(); | ||
71 | void purgeRedoState(); | 71 | void purgeRedoState(); | ||
72 | }; | 72 | }; | ||
73 | 73 | | |||
74 | #endif /* __KIS_UNDO_STORES_H */ | 74 | #endif /* __KIS_UNDO_STORES_H */ |