summaryrefslogtreecommitdiff
path: root/src/profile.h
diff options
context:
space:
mode:
authorLostDragonist <lost.dragonist@gmail.com>2019-01-22 14:59:07 -0600
committerLostDragonist <lost.dragonist@gmail.com>2019-01-22 14:59:07 -0600
commit7fd81029ce2f67aa7a6555858dfed7d6ac58c4e3 (patch)
tree7cfca3567dbd02aee370ffa68e1cff28f4b37b1c /src/profile.h
parenta40613f885c18a8a9f090cd88c595bcb960d97c9 (diff)
Reduce file I/O operations when enabling/disabling multiple mods
Diffstat (limited to 'src/profile.h')
-rw-r--r--src/profile.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/profile.h b/src/profile.h
index dea933ad..a7ba7e91 100644
--- a/src/profile.h
+++ b/src/profile.h
@@ -274,6 +274,16 @@ public:
void setModEnabled(unsigned int index, bool enabled);
/**
+ * @brief enable or disable multiple mods at once
+ * This is an abbreviated process and should be immediately followed by a full refresh
+ * to maintain data consistency.
+ *
+ * @param modsToEnable list of mod indicies to enable
+ * @param modsToDisable list of mod indicies to disable
+ **/
+ void setModsEnabled(const QList<unsigned int> &modsToEnable, const QList<unsigned int> &modsToDisable);
+
+ /**
* change the priority of a mod. Of course this also changes the priority of other mods.
* The priority of the mods in the range ]old, new priority] are shifted so that no gaps
* are possible.
@@ -335,6 +345,13 @@ signals:
**/
void modStatusChanged(unsigned int index);
+ /**
+ * @brief emitted whenever the status (enabled/disabled) of multiple mods change
+ *
+ * @param index list of indices of the mods that changed
+ **/
+ void modStatusChanged(QList<unsigned int> index);
+
public slots:
// should only be called by DelayedFileWriter, use writeModlist() and writeModlistNow() instead