Added a QSortFilterProxyModel subclass to enable sorting by different columns in the views.

This commit is contained in:
2026-01-12 09:56:50 +01:00
parent 3597fcf0b0
commit a6512f2c67
5 changed files with 77 additions and 1 deletions

View File

@ -8,6 +8,7 @@ class QAbstractItemModel;
class QString;
class TableModel;
class GeneralSortFilterModel;
class GenericCore : public QObject {
Q_OBJECT
@ -24,6 +25,7 @@ class GenericCore : public QObject {
QUndoStack* getModelUndoStack() const;
std::shared_ptr<TableModel> getModel() const;
std::shared_ptr<GeneralSortFilterModel> getSortFilterModel() const;
void saveItems();
void importCSVFile(const QString& filePath);
@ -35,6 +37,7 @@ class GenericCore : public QObject {
private:
QUndoStack* m_modelUndoStack;
std::shared_ptr<TableModel> m_mainModel;
std::shared_ptr<GeneralSortFilterModel> m_sortFilterModel;
void setupModels();
void initModelData();