49 lines
1020 B
C++
49 lines
1020 B
C++
#ifndef GENERICCORE_H
|
|
#define GENERICCORE_H
|
|
|
|
#include <QObject>
|
|
|
|
class QUndoStack;
|
|
class QAbstractItemModel;
|
|
class QString;
|
|
|
|
class TableModel;
|
|
class GeneralSortFilterModel;
|
|
|
|
class GenericCore : public QObject {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
GenericCore();
|
|
~GenericCore();
|
|
|
|
QString toString() const;
|
|
void sayHello() const;
|
|
|
|
bool isApplicationUpdateAvailable();
|
|
void triggerApplicationUpdate(const bool saveChanges);
|
|
|
|
QUndoStack* getModelUndoStack() const;
|
|
std::shared_ptr<TableModel> getModel() const;
|
|
std::shared_ptr<GeneralSortFilterModel> getSortFilterModel() const;
|
|
|
|
void saveItems();
|
|
void importCSVFile(const QString& filePath);
|
|
bool exportCSVFile(const QString& filePath);
|
|
|
|
signals:
|
|
void displayStatusMessage(QString message);
|
|
|
|
private:
|
|
QUndoStack* m_modelUndoStack;
|
|
std::shared_ptr<TableModel> m_mainModel;
|
|
std::shared_ptr<GeneralSortFilterModel> m_sortFilterModel;
|
|
|
|
void setupModels();
|
|
void initModelData();
|
|
|
|
QString getMaintenanceToolFilePath() const;
|
|
};
|
|
|
|
#endif // GENERICCORE_H
|