2025-10-02 11:19:14 +02:00
|
|
|
#ifndef GENERICCORE_H
|
|
|
|
|
#define GENERICCORE_H
|
|
|
|
|
|
2025-10-31 14:47:27 +01:00
|
|
|
#include <QObject>
|
|
|
|
|
|
2025-12-06 10:34:44 +01:00
|
|
|
class QUndoStack;
|
2025-12-02 15:59:34 +01:00
|
|
|
class QAbstractItemModel;
|
2025-10-02 16:22:47 +02:00
|
|
|
class QString;
|
|
|
|
|
|
2025-12-02 15:59:34 +01:00
|
|
|
class TableModel;
|
2026-01-12 09:56:50 +01:00
|
|
|
class GeneralSortFilterModel;
|
2025-12-02 15:59:34 +01:00
|
|
|
|
2025-10-31 14:47:27 +01:00
|
|
|
class GenericCore : public QObject {
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
2025-10-02 16:22:01 +02:00
|
|
|
public:
|
|
|
|
|
GenericCore();
|
|
|
|
|
~GenericCore();
|
2025-10-02 13:42:13 +02:00
|
|
|
|
2025-10-02 16:22:47 +02:00
|
|
|
QString toString() const;
|
2025-10-02 16:22:01 +02:00
|
|
|
void sayHello() const;
|
2025-10-31 14:47:27 +01:00
|
|
|
|
|
|
|
|
bool isApplicationUpdateAvailable();
|
2026-01-06 10:15:01 +01:00
|
|
|
void triggerApplicationUpdate(const bool saveChanges);
|
2025-10-31 14:47:27 +01:00
|
|
|
|
2025-12-11 15:46:28 +01:00
|
|
|
QUndoStack* getModelUndoStack() const;
|
2025-12-08 13:25:02 +01:00
|
|
|
std::shared_ptr<TableModel> getModel() const;
|
2026-01-12 09:56:50 +01:00
|
|
|
std::shared_ptr<GeneralSortFilterModel> getSortFilterModel() const;
|
2025-12-02 15:59:34 +01:00
|
|
|
|
2025-12-23 10:14:13 +01:00
|
|
|
void saveItems();
|
2026-01-04 13:38:54 +01:00
|
|
|
void importCSVFile(const QString& filePath);
|
2026-01-06 10:04:26 +01:00
|
|
|
bool exportCSVFile(const QString& filePath);
|
2025-12-23 10:14:13 +01:00
|
|
|
|
2025-10-31 14:47:27 +01:00
|
|
|
signals:
|
|
|
|
|
void displayStatusMessage(QString message);
|
|
|
|
|
|
|
|
|
|
private:
|
2025-12-11 15:46:28 +01:00
|
|
|
QUndoStack* m_modelUndoStack;
|
2025-12-02 15:59:34 +01:00
|
|
|
std::shared_ptr<TableModel> m_mainModel;
|
2026-01-12 09:56:50 +01:00
|
|
|
std::shared_ptr<GeneralSortFilterModel> m_sortFilterModel;
|
2025-12-02 15:59:34 +01:00
|
|
|
|
|
|
|
|
void setupModels();
|
2025-12-23 13:40:33 +01:00
|
|
|
void initModelData();
|
2025-12-02 15:59:34 +01:00
|
|
|
|
2025-10-31 14:47:27 +01:00
|
|
|
QString getMaintenanceToolFilePath() const;
|
2025-10-02 11:19:14 +02:00
|
|
|
};
|
|
|
|
|
|
2025-10-02 16:22:01 +02:00
|
|
|
#endif // GENERICCORE_H
|