25 #ifndef _MULTI_VIEW_COMMAND_HISTORY_H_ 26 #define _MULTI_VIEW_COMMAND_HISTORY_H_ 98 void addCommand(Command *command,
bool execute,
bool bundle =
false);
void addToCompound(Command *command, bool execute)
void setBundleTimeout(int msec)
Set the time after which a bundle will be closed if nothing is added.
void bundleTimerTimeout()
void addExecutedCommand(Command *)
Add a command to the history that has already been executed, without executing it again.
void addCommandAndExecute(Command *)
Add a command to the history and also execute it.
int getBundleTimeout() const
Return the time after which a bundle will be closed if nothing is added.
int getUndoLimit() const
Return the maximum number of items in the undo history.
void startCompoundOperation(QString name, bool execute)
Start recording commands to batch up into a single compound command.
void endCompoundOperation()
Finish recording commands and store the compound command.
std::stack< Command * > CommandStack
void addCommand(Command *command)
Add a command to the command history.
void setUndoLimit(int limit)
Set the maximum number of items in the undo history.
void activity(QString)
Emitted when some activity happened (for activity logging).
void setMenuLimit(int limit)
Set the maximum number of items in the menus.
QAction * m_redoMenuAction
QAction * m_undoMenuAction
int getRedoLimit() const
Return the maximum number of items in the redo history.
void documentRestored()
Emitted when the undo/redo stack has reached the same state at which the documentSaved slot was last ...
void registerToolbar(QToolBar *toolbar)
void commandUnexecuted(Command *)
Emitted whenever a command has just been unexecuted, whether by addCommand or undo.
void redoActivated(QAction *)
std::map< QAction *, int > m_actionCounts
void undoActivated(QAction *)
The CommandHistory class stores a list of executed commands and maintains Undo and Redo actions synch...
static CommandHistory * getInstance()
void registerMenu(QMenu *menu)
static CommandHistory * m_instance
void setRedoLimit(int limit)
Set the maximum number of items in the redo history.
void commandExecuted()
Emitted whenever a command has just been executed or unexecuted, whether by addCommand,...
virtual ~CommandHistory()
void clipStack(CommandStack &stack, int limit)
int getMenuLimit() const
Return the maximum number of items visible in undo and redo menus.
void addToBundle(Command *command, bool execute)
MacroCommand * m_currentBundle
virtual void documentSaved()
Checkpoint function that should be called when the document is saved.
MacroCommand * m_currentCompound
QString m_currentBundleName
void clearStack(CommandStack &stack)