20#ifndef LIBREPCB_EDITOR_UNDOSTACK_H
21#define LIBREPCB_EDITOR_UNDOSTACK_H
35class UndoCommandGroup;
131 QString getUndoCmdText() const noexcept;
138 QString getRedoCmdText() const noexcept;
144 bool canUndo() const noexcept;
150 bool canRedo() const noexcept;
160 uint getUniqueStateId() const noexcept;
172 bool isClean() const noexcept;
180 bool isCommandGroupActive() const noexcept;
187 void setClean() noexcept;
214 bool execCmd(
UndoCommand* cmd,
bool forceKeepCmd = false);
227 void beginCmdGroup(const QString& text);
255 bool commitCmdGroup();
263 void abortCmdGroup();
293 void clear() noexcept;
296 void cleanChanged(
bool clean);
297 void stateModified();
The UndoCommandGroup class makes it possible to pack multiple undo commands together (it acts as a pa...
Definition undocommandgroup.h:44
The UndoCommand class represents a command which you can undo/redo.
Definition undocommand.h:46
The UndoStack class holds UndoCommand objects and provides undo/redo commands.
Definition undostack.h:106
UndoStack(const UndoStack &other)=delete
UndoStack & operator=(const UndoStack &rhs)=delete
The UndoStackTransaction class helps to execute transactions on an UndoStack.
Definition undostack.h:56
void append(UndoCommand *cmd)
Definition undostack.cpp:58
UndoStack & mStack
Definition undostack.h:73
~UndoStackTransaction() noexcept
Definition undostack.cpp:49
UndoStackTransaction()=delete
bool mCmdActive
Definition undostack.h:74
void abort()
Definition undostack.cpp:63
UndoStackTransaction(const UndoStackTransaction &other)=delete
bool commit()
Definition undostack.cpp:69
Definition occmodel.cpp:77