summaryrefslogtreecommitdiffstats
path: root/commands/command_base.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2020-01-11 15:22:50 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-03-10 09:25:57 -0700
commit41072cf48f59b67391bac637002ca4a4c224eff6 (patch)
treeadccb23aae83777e58c9d5fd11b2950c4695f4b3 /commands/command_base.cpp
parent2936d203e22058b8816fd54070b4b14dc6a362fb (diff)
downloadsubsurface-41072cf48f59b67391bac637002ca4a4c224eff6.tar.gz
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>
Diffstat (limited to 'commands/command_base.cpp')
-rw-r--r--commands/command_base.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/commands/command_base.cpp b/commands/command_base.cpp
index edfc97bf3..20147a541 100644
--- a/commands/command_base.cpp
+++ b/commands/command_base.cpp
@@ -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"));