mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core/undo: provide access to the QUndoStack
This is used by the mobile UI to get notifications when the undo text changes. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
2936d203e2
commit
41072cf48f
2 changed files with 8 additions and 0 deletions
|
@ -29,6 +29,12 @@ bool isClean()
|
|||
return undoStack.isClean();
|
||||
}
|
||||
|
||||
// this can be used to get access to the signals emitted by the QUndoStack
|
||||
QUndoStack *getUndoStack()
|
||||
{
|
||||
return &undoStack;
|
||||
}
|
||||
|
||||
QAction *undoAction(QObject *parent)
|
||||
{
|
||||
return undoStack.createUndoAction(parent, QCoreApplication::translate("Command", "&Undo"));
|
||||
|
|
|
@ -172,6 +172,8 @@ public:
|
|||
// If nothing is to be done, the command will be deleted and false is returned.
|
||||
bool execute(Base *cmd);
|
||||
|
||||
QUndoStack *getUndoStack();
|
||||
|
||||
} // namespace Command
|
||||
|
||||
#endif // COMMAND_BASE_H
|
||||
|
|
Loading…
Add table
Reference in a new issue