Basically like in this tutorial: https://doc.qt.io/qt-6/modelview.html#2-1-a-read-only-table
38 lines
615 B
C++
38 lines
615 B
C++
#ifndef GENERICCORE_H
|
|
#define GENERICCORE_H
|
|
|
|
#include <QObject>
|
|
|
|
class QAbstractItemModel;
|
|
class QString;
|
|
|
|
class TableModel;
|
|
|
|
class GenericCore : public QObject {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
GenericCore();
|
|
~GenericCore();
|
|
|
|
QString toString() const;
|
|
void sayHello() const;
|
|
|
|
bool isApplicationUpdateAvailable();
|
|
void triggerApplicationUpdate();
|
|
|
|
std::shared_ptr<QAbstractItemModel> getModel() const;
|
|
|
|
signals:
|
|
void displayStatusMessage(QString message);
|
|
|
|
private:
|
|
std::shared_ptr<TableModel> m_mainModel;
|
|
|
|
void setupModels();
|
|
|
|
QString getMaintenanceToolFilePath() const;
|
|
};
|
|
|
|
#endif // GENERICCORE_H
|