Added a QSortFilterProxyModel subclass to enable sorting by different columns in the views.
This commit is contained in:
@ -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();
|
||||
|
||||
Reference in New Issue
Block a user