Added a QUndoStack and made it accessible for UIs.

This commit is contained in:
2025-12-06 10:34:44 +01:00
parent a07e03d80d
commit 5b5713c89f
3 changed files with 11 additions and 2 deletions

View File

@ -12,11 +12,15 @@
#include "constants.h"
#include "model/tablemodel.h"
#include <QtGui/QUndoStack>
using namespace std;
GenericCore::GenericCore() {
qDebug() << "Creating core...";
m_modelUndoStack = make_shared<QUndoStack>(this);
setupModels();
}
@ -70,6 +74,8 @@ void GenericCore::triggerApplicationUpdate() {
QProcess::startDetached(toolFilePath, args);
}
std::shared_ptr<QUndoStack> GenericCore::getModUndoStack() const { return m_modelUndoStack; }
std::shared_ptr<QAbstractItemModel> GenericCore::getModel() const { return m_mainModel; }
void GenericCore::setupModels() {