diff options
author | Petr Mrázek <peterix@gmail.com> | 2019-08-05 00:44:56 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2019-08-05 00:46:59 +0200 |
commit | c291946d2a8c3e03940da4070533e124283d303c (patch) | |
tree | 23155f22afed3812b187b915d2f28b8dc0c5e0f2 /api/logic/minecraft/mod/ModFolderModel.h | |
parent | dfb30d91397f6b5ed80d94b7dde4e71346b1be35 (diff) | |
download | MultiMC-c291946d2a8c3e03940da4070533e124283d303c.tar MultiMC-c291946d2a8c3e03940da4070533e124283d303c.tar.gz MultiMC-c291946d2a8c3e03940da4070533e124283d303c.tar.lz MultiMC-c291946d2a8c3e03940da4070533e124283d303c.tar.xz MultiMC-c291946d2a8c3e03940da4070533e124283d303c.zip |
NOISSUE do not lose selection on mod enable/disable toggle0.6.7
Diffstat (limited to 'api/logic/minecraft/mod/ModFolderModel.h')
-rw-r--r-- | api/logic/minecraft/mod/ModFolderModel.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/api/logic/minecraft/mod/ModFolderModel.h b/api/logic/minecraft/mod/ModFolderModel.h index 624345be..8394e405 100644 --- a/api/logic/minecraft/mod/ModFolderModel.h +++ b/api/logic/minecraft/mod/ModFolderModel.h @@ -48,6 +48,11 @@ public: DateColumn, NUM_COLUMNS }; + enum ModStatusAction { + Disable, + Enable, + Toggle + }; ModFolderModel(const QString &dir); virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; @@ -93,8 +98,7 @@ public: bool deleteMods(const QModelIndexList &indexes); /// Enable or disable listed mods - bool enableMods(const QModelIndexList &indexes, bool enable = true); - void toggleEnabled(const QModelIndex &index); + bool setModStatus(const QModelIndexList &indexes, ModStatusAction action); void startWatching(); void stopWatching(); @@ -125,6 +129,7 @@ signals: private: void resolveMod(Mod& m); + bool setModStatus(int index, ModStatusAction action); protected: QFileSystemWatcher *m_watcher; |