Added a simple read-only TableModel and made it accessible via GenericCore.
Basically like in this tutorial: https://doc.qt.io/qt-6/modelview.html#2-1-a-read-only-table
This commit is contained in:
@ -10,10 +10,15 @@
|
||||
#include "../../ApplicationConfig.h"
|
||||
#include "CoreConfig.h"
|
||||
#include "constants.h"
|
||||
#include "model/tablemodel.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
GenericCore::GenericCore() { qDebug() << "Creating core..."; }
|
||||
GenericCore::GenericCore() {
|
||||
qDebug() << "Creating core...";
|
||||
|
||||
setupModels();
|
||||
}
|
||||
|
||||
GenericCore::~GenericCore() { qDebug() << "Destroying core..."; }
|
||||
|
||||
@ -65,6 +70,10 @@ void GenericCore::triggerApplicationUpdate() {
|
||||
QProcess::startDetached(toolFilePath, args);
|
||||
}
|
||||
|
||||
std::shared_ptr<QAbstractItemModel> GenericCore::getModel() const { return m_mainModel; }
|
||||
|
||||
void GenericCore::setupModels() { m_mainModel = make_shared<TableModel>(this); }
|
||||
|
||||
QString GenericCore::getMaintenanceToolFilePath() const {
|
||||
QString applicationDirPath = QCoreApplication::applicationDirPath();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user