Controller for performing undo-able commands.
More...
#include <undocontroller.h>
|
|
| UndoController () |
| | Constructs a new controller for performing undo-able commands.
|
| |
|
void | clear () |
| | Removes all recent undo-able commands from the undo stack.
|
| |
| QAction * | createRedoAction (QObject *parent, const QString &prefix) |
| | Creates an action for re-doing the most recently undone command. More...
|
| |
| QAction * | createUndoAction (QObject *parent, const QString &prefix) |
| | Creates an action for un-doing the most recent command. More...
|
| |
| void | doCommand (QUndoCommand *command) |
| | Applies the passed command, pushing it to the undo stack. More...
|
| |
| bool | isClean () const |
| | Whether any commands have been applied since the project was opened or saved. More...
|
| |
|
void | setClean () |
| | Marks the undo stack as clean, as if no commands have been applied since the project was opened or saved.
|
| |
Controller for performing undo-able commands.
◆ createRedoAction()
| QAction * UndoController::createRedoAction |
( |
QObject * |
parent, |
|
|
const QString & |
prefix |
|
) |
| |
Creates an action for re-doing the most recently undone command.
- Parameters
-
| parent | Parent of the action to create. |
| prefix | Prefix to show before the name of the command to redo. |
- Returns
- Action for re-doing the most recently undone command.
◆ createUndoAction()
| QAction * UndoController::createUndoAction |
( |
QObject * |
parent, |
|
|
const QString & |
prefix |
|
) |
| |
Creates an action for un-doing the most recent command.
- Parameters
-
| parent | Parent of the action to create. |
| prefix | Prefix to show before the name of the command to undo. |
- Returns
- Action for re-doing the most recent command.
◆ doCommand()
| void UndoController::doCommand |
( |
QUndoCommand * |
command | ) |
|
Applies the passed command, pushing it to the undo stack.
- Parameters
-
◆ isClean()
| bool UndoController::isClean |
( |
| ) |
const |
Whether any commands have been applied since the project was opened or saved.
- Returns
- Whether any commands have been applied since the project was opened or saved, or not.
◆ undoStackChanged
| void Tome::UndoController::undoStackChanged |
( |
bool |
clean | ) |
|
|
signal |
Undo stack has become dirty or clean.
- Parameters
-
| clean | Whether no commands have been applied since the project was opened or saved. |
The documentation for this class was generated from the following files:
- Source/Tome/Features/Undo/Controller/undocontroller.h
- Source/Tome/Features/Undo/Controller/undocontroller.cpp