refactor: move more tied logic to model and move logic to the resources
This moves the QSortFilterProxyModel to the resource model files, acessible via a factory method, and moves the sorting and filtering to the objects themselves, decoupling the code a bit. This also adds a basic implementation of methods in the ResourceFolderModel, simplifying the process of constructing a new model from it. Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
@ -91,15 +91,13 @@ public:
|
||||
/// Deletes all the selected mods
|
||||
bool deleteMods(const QModelIndexList &indexes);
|
||||
|
||||
void disableInteraction(bool disabled) { ResourceFolderModel::enableInteraction(!disabled); }
|
||||
|
||||
/// Enable or disable listed mods
|
||||
bool setModStatus(const QModelIndexList &indexes, ModStatusAction action);
|
||||
|
||||
bool isValid();
|
||||
|
||||
void startWatching();
|
||||
void stopWatching();
|
||||
bool startWatching() override;
|
||||
bool stopWatching() override;
|
||||
|
||||
QDir indexDir() { return { QString("%1/.index").arg(dir().absolutePath()) }; }
|
||||
|
||||
|
Reference in New Issue
Block a user