summaryrefslogtreecommitdiff
path: root/src/profile.h
diff options
context:
space:
mode:
authorLostDragonist <lost.dragonist@gmail.com>2019-05-03 21:32:33 -0500
committerLostDragonist <lost.dragonist@gmail.com>2019-05-03 21:32:33 -0500
commit179a73857125ee604f42b0d5c2d765183c86d2c7 (patch)
treeb9b3f9d62bd5640de839d150a53ab8ef119dab9c /src/profile.h
parente2b799bd6b5cfd51969fefd1dab5e5b1b7e5f81c (diff)
parent907c5468424b48774f5da2a6b5f96f26590987b0 (diff)
Merge pull request #695 from ModOrganizer2/Develop
Stage for Release 2.2.0
Diffstat (limited to 'src/profile.h')
-rw-r--r--src/profile.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/profile.h b/src/profile.h
index a9d68062..a7ba7e91 100644
--- a/src/profile.h
+++ b/src/profile.h
@@ -24,12 +24,14 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include "modinfo.h"
#include <iprofile.h>
#include <delayedfilewriter.h>
+#include "executableinfo.h"
#include <QByteArray>
#include <QDir>
#include <QObject>
#include <QString>
#include <QSettings>
+#include <QList>
#include <boost/shared_ptr.hpp>
@@ -234,6 +236,13 @@ public:
std::vector<std::tuple<QString, QString, int> > getActiveMods();
/**
+ * @brief retrieve a mod of the indexes ordered by priority
+ *
+ * @return map of indexes by priority
+ **/
+ std::map<int, unsigned int> getAllIndexesByPriority() { return m_ModIndexByPriority; }
+
+ /**
* retrieve the number of mods for which this object has status information.
* This is usually the same as ModInfo::getNumMods() except between
* calls to ModInfo::updateFromDisc() and the Profile::refreshModStatus()
@@ -265,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.
@@ -303,8 +322,20 @@ public:
void removeSetting(const QString &section, const QString &name = QString());
void removeSetting(const QString &name);
+ QVariantMap settingsByGroup(const QString &section) const;
+ void storeSettingsByGroup(const QString &section, const QVariantMap &values);
+
+ QList<QVariantMap> settingsByArray(const QString &prefix) const;
+ void storeSettingsByArray(const QString &prefix, const QList<QVariantMap> &values);
+
int getPriorityMinimum() const;
+ bool forcedLibrariesEnabled(const QString &executable);
+ void setForcedLibrariesEnabled(const QString &executable, bool enabled);
+ QList<MOBase::ExecutableForcedLoadSetting> determineForcedLibraries(const QString &executable);
+ void storeForcedLibraries(const QString &executable, const QList<MOBase::ExecutableForcedLoadSetting> &values);
+ void removeForcedLibraries(const QString &executable);
+
signals:
/**
@@ -314,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