aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--commands/command_base.cpp6
-rw-r--r--commands/command_base.h2
2 files changed, 8 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"));
diff --git a/commands/command_base.h b/commands/command_base.h
index 9a2f6cf34..59c3cd412 100644
--- a/commands/command_base.h
+++ b/commands/command_base.h
@@ -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