![]() |
Limo
A simple mod manager
|
Contains several ModdedApplication objects and provides access to their functions using Qt's signal/ slot mechanism. More...
#include <applicationmanager.h>
Public Slots | |
void | addApplication (EditApplicationInfo info) |
Adds a new application. | |
void | removeApplication (int app_id, bool cleanup) |
Removes an application and optionally deletes all installed mods and the settings file in the application's staging directory. | |
void | deployMods (int app_id) |
Deploys mods using all Deployer objects of one application. | |
void | deployModsFor (int app_id, std::vector< int > deployer_ids) |
Deploys mods for given deployers and given application. | |
void | unDeployMods (int app_id) |
Undeploys mods using all Deployer objects of one application. | |
void | unDeployModsFor (int app_id, std::vector< int > deployer_ids) |
Undeploys mods for given deployers and given application. | |
void | installMod (int app_id, AddModInfo info) |
Installs a new mod for one application using the given Installer type. | |
void | uninstallMods (int app_id, std::vector< int > mod_ids, std::string installer_type) |
Uninstalls the given mods for one application, this includes deleting all installed files. | |
void | changeLoadorder (int app_id, int deployer, int from_idx, int to_idx) |
Moves a mod from one position in the load order to another for given Deployer for given application. | |
void | updateModDeployers (int app_id, std::vector< int > mod_ids, std::vector< bool >) |
Updates which deployer should manage given mods. | |
void | removeModFromDeployer (int app_id, int deployer, int mod_id) |
Removes a mod from the load order for given Deployer for given application. | |
void | setModStatus (int app_id, int deployer, int mod_id, bool status) |
Enables or disables the given mod in the load order for given Deployer for given application. | |
void | addDeployer (int app_id, EditDeployerInfo info) |
Adds a new Deployer of given type to given application. | |
void | removeDeployer (int app_id, int deployer, bool cleanup) |
Removes a Deployer from an application. | |
void | getDeployerNames (int app_id, bool is_new) |
Creates a vector containing the names of all Deployer objects for one application. Emits sendDeployerNames. | |
void | getModInfo (int app_id) |
Creates a vector containing information about all installed mods, stored in ModInfo objects for one application. Emits sendModInfo. | |
void | getDeployerInfo (int app_id, int deployer) |
Creates DeployerInfo for one Deployer for one application. Emits sendDeployerInfo. | |
void | getApplicationNames (bool is_new) |
Emits sendApplicationNames. | |
void | changeModName (int app_id, int mod_id, QString new_name) |
Setter for a mod name. | |
void | getFileConflicts (int app_id, int deployer, int mod_id, bool show_disabled) |
Checks for file conflicts of given mod with all other mods in the load order for one Deployer of one application. Emits sendFileConflicts. | |
void | getAppInfo (int app_id) |
Creates AppInfo for given application. Emits sendAppInfo. | |
void | addTool (int app_id, Tool tool) |
Adds a new tool to given application. | |
void | removeTool (int app_id, int tool_id) |
Removes a tool from given application. | |
void | editApplication (EditApplicationInfo info, int app_id) |
Edits an application and optionally moves all of it's mods to a new directory. | |
void | editDeployer (EditDeployerInfo info, int app_id, int deployer) |
Used to set type, name and target directory for one deployer of one application. | |
void | getModConflicts (int app_id, int deployer, int mod_id) |
Checks for conflicts with other mods for one Deployer of one application. Two mods are conflicting if they share at least one file. Emits sendModConflicts. | |
void | setProfile (int app_id, int profile) |
Sets the currently active profile for given application. | |
void | addProfile (int app_id, EditProfileInfo info) |
Adds a new profile to one application and optionally copies it's load order from an existing profile. | |
void | removeProfile (int app_id, int profile) |
Removes a profile from an application. | |
void | getProfileNames (int app_id, bool is_new) |
Creates a vector containing the names of all profiles of one application. Emits sendProfileNames. | |
void | editProfile (int app_id, int profile, EditProfileInfo info) |
Used to set the name of a profile for one application. | |
void | editTool (int app_id, int tool_id, Tool new_tool) |
Used to replace an existing to with a now one for a application. | |
void | addModToGroup (int app_id, int mod_id, int group) |
Adds a mod to an existing group of an application. | |
void | removeModFromGroup (int app_id, int mod_id) |
Removes a mod from it's group for one application. | |
void | createGroup (int app_id, int first_mod_id, int second_mod_id) |
Creates a new group containing the two given mods for one application. A group is a set of mods where only one member, the active member, will be deployed. | |
void | changeActiveGroupMember (int app_id, int group, int mod_id) |
Changes the active member of given group of an application to given mod. | |
void | changeModVersion (int app_id, int mod_id, QString new_version) |
Sets the given mod's version to the given new version for one application. | |
void | sortModsByConflicts (int app_id, int deployer) |
Sorts the load order by grouping mods which contain conflicting files. | |
void | extractArchive (int app_id, int mod_id, QString source, QString target, QString remote_source, QString version, QString name) |
Extracts the given archive to the given location. | |
void | addBackupTarget (int app_id, QString path, QString name, QString default_backup, QString first_backup) |
Adds a new target file or directory to be managed by the BackupManager of given ModdedApplication. | |
void | removeBackupTarget (int app_id, int target_id) |
Removes the given backup target from the given ModdedApplication by deleting all relevant backups and config files. | |
void | addBackup (int app_id, int target_id, QString name, int source) |
Adds a new backup for the given target for the given ModdedApplication by copying the currently active backup. | |
void | removeBackup (int app_id, int target_id, int backup_id) |
Deletes the given backup for given target for given ModdedApplication. | |
void | setActiveBackup (int app_id, int target_id, int backup_id) |
Changes the currently active backup for the given target for the given ModdedApplication. | |
void | getBackupTargets (int app_id) |
Returns a vector containing information about all managed backup targets of given ModdedApplication. Emits sendBackupTargets. | |
void | setBackupName (int app_id, int target_id, int backup_id, QString name) |
Changes the name of the given backup for the given target for the given ModdedApplication. | |
void | setBackupTargetName (int app_id, int target_id, QString name) |
Changes the name of the given backup target for the given ModdedApplication. | |
void | overwriteBackup (int app_id, int target_id, int source_backup, int dest_backup) |
Deletes all files in the dest backup and replaces them with the files from the source backup for the given ModdedApplication. | |
void | onScrollLists () |
Used to synchronize scrolling in lists with the event queue. | |
void | uninstallGroupMembers (int app_id, const std::vector< int > &mod_ids) |
Uninstalls all mods which are inactive group members of any group which contains any of the given mods for the given ModdedApplication. | |
void | addManualTag (int app_id, QString tag_name) |
Adds a new tag with the given name to the given ModdedApplication. Fails if a tag by that name already exists. | |
void | removeManualTag (int app_id, QString tag_name) |
Removes the tag with the given name, if it exists, from the given ModdedApplication. | |
void | changeManualTagName (int app_id, QString old_name, QString new_name) |
Changes the name of the given tag to the given new name for the given ModdedApplication. Fails if a tag by the given name exists. | |
void | addTagsToMods (int app_id, QStringList tag_names, const std::vector< int > &mod_ids) |
Adds the given tag to all given mods for the given ModdedApplication. | |
void | removeTagsFromMods (int app_id, QStringList tag_names, const std::vector< int > &mod_ids) |
Removes the given tag from the given mods for the given ModdedApplication. | |
void | setTagsForMods (int app_id, QStringList tag_names, const std::vector< int > &mod_ids) |
Sets the tags for all given mods to the given tags for the given ModdedApplication. | |
void | editManualTags (int app_id, std::vector< EditManualTagAction > actions) |
Performes the given tag editing actions for the given ModdedApplication. | |
void | editAutoTags (int app_id, std::vector< EditAutoTagAction > actions) |
Performes the given tag editing actions for the given ModdedApplication. | |
void | reapplyAutoTags (int app_id) |
Reapplies all auto tags for all mods for the given ModdedApplication. | |
void | updateAutoTags (int app_id, std::vector< int > mod_ids) |
Reapplies all auto tags to the given mods for the given ModdedApplication. | |
void | editModSources (int app_id, int mod_id, QString local_source, QString remote_source) |
Sets a mods local and remote source to the given values for the given ModdedApplication. | |
void | getNexusPage (int app_id, int mod_id) |
Fetches data for the given mod from NexusMods. | |
void | downloadMod (int app_id, QString nxm_url) |
Downloads a mod from nexusmods using the given nxm_url. | |
void | downloadModFile (int app_id, int mod_id, int nexus_file_id, QString mod_url) |
Downloads the file with the given id for the given mod url from nexusmods. | |
void | checkForModUpdates (int app_id) |
Checks for available mod updates on NexusMods. | |
void | checkModsForUpdates (int app_id, const std::vector< int > &mod_ids) |
Checks for available updates for the given mod for the given app. | |
void | suppressUpdateNotification (int app_id, const std::vector< int > &mod_ids) |
Temporarily disables update notifications for the given mods. | |
void | getExternalChanges (int app_id, int deployer, bool deploy) |
Checks if files deployed by the given app by the given deployer have been externally overwritten. | |
void | keepOrRevertFileModifications (int app_id, int deployer, const FileChangeChoices &changes_to_keep, bool deploy) |
Keeps or reverts external changes for one app for one deployer. For every given file: Moves the modified file into the source mods directory and links it back in, if the changes are to be kept. Else: Deletes that file and restores the original link. | |
void | exportAppConfiguration (int app_id, std::vector< int > deployers, QStringList auto_tags) |
Exports configurations for the given deployers and the given auto tags to a json file. Does not include mods. | |
void | updateIgnoredFiles (int app_id, int deployer) |
Updates the file ignore list for ReverseDeployers. | |
void | addModToIgnoreList (int app_id, int deployer, int mod_id) |
Adds the given mod to the ignore list of the given ReverseDeployer. | |
void | applyModAction (int app_id, int deployer, int action, int mod_id) |
Applies the given mod action to the given mod. | |
Signals | |
void | sendDeployerNames (QStringList names, bool is_new) |
Sends the names of all deployers. | |
void | sendModInfo (std::vector< ModInfo > mod_info) |
Sends ModInfo for one application. | |
void | sendLoadorder (std::vector< std::tuple< int, bool > > loadorder) |
Sends the load order for one deployer of one application. | |
void | sendDeployerInfo (DeployerInfo depl_info) |
Sends DeployerInfo for one deployer of one application. | |
void | sendApplicationNames (QStringList names, QStringList icon_paths, bool is_new) |
Sends a list containing all application names. | |
void | completedOperations (QString message="") |
Emitted after potentially slow operations, e.g. installing a mod, are completed. | |
void | sendFileConflicts (std::vector< ConflictInfo > conflicts) |
Sends file conflicts for one mod for one deployer of one application. | |
void | sendAppInfo (AppInfo app_info) |
Sends AppInfo for one application. | |
void | sendModConflicts (std::unordered_set< int > conflicts) |
Sends mod conflicts for one mod for one deployer of one application. | |
void | sendProfileNames (QStringList names, bool is_new) |
Sends a list of all profile names for one application. | |
void | sendError (QString title, QString message) |
Sends an error message. | |
void | extractionComplete (int app_id, int mod_id, bool success, QString extracted_path, QString local_source, QString remote_source, QString version, QString name) |
Emitted after archive extraction is complete. | |
void | logMessage (Log::LogLevel log_level, QString message) |
Sends a log message to the logging window. | |
void | sendBackupTargets (std::vector< BackupTarget > targets) |
Sends a vector containing info about all backup targets managed by given ModdedApplication. | |
void | scrollLists () |
Used to synchronize scrolling in lists with the event queue. | |
void | updateProgress (float progress) |
Informs about the progress in the current task. | |
void | sendNexusPage (int app_id, int mod_id, nexus::Page page) |
Sends NexusMods data for a specific mod. | |
void | downloadComplete (int app_id, int mod_id, QString file_path, QString mod_url) |
Signals successful completion of a mod download. | |
void | downloadFailed () |
Signals a failed download. | |
void | modInstallationComplete (bool success) |
Signals mod installation has been completed. | |
void | sendExternalChangesInfo (int app_id, ExternalChangesInfo info, int num_deployers, bool deploy) |
Sends data about externally modified files for one app for one deployer. | |
void | externalChangesHandled (int app_id, int deployer, int num_deployers, bool deploy) |
Signals that external changes to files for given app for given deployer have been handled. | |
Public Member Functions | |
ApplicationManager (QObject *parent=nullptr) | |
Constructor. Only one instance of this class is support at a time. | |
virtual | ~ApplicationManager () |
Decreases the static number of instances counter. | |
void | init () |
If a JSON file with settings already exists for this user: Restores the internal state from that file. Else: Creates a new settings file. | |
void | sendLogMessage (Log::LogLevel log_level, const std::string &message) |
Sends a log message to the logging window. | |
std::string | toString () const |
Generates a string which contains the ids and names of every application as well as their profiles. | |
int | getNumApplications () const |
Returns the number of managed \ModdedApplication "applications". | |
int | getNumProfiles (int app_id) const |
Returns the number of profiles for one application. | |
void | enableExceptions (bool enabled) |
Enable or disable throwing exceptions. | |
Private Member Functions | |
template<auto f, typename... Args> | |
bool | handleExceptions (int app_id, Args &&... args) |
Wrapper for member functions of ModdedApplication. Calls the function specified in the template for the ModdedApplication stored at apps_[app_id] with the given arguments and handles all exceptions thrown by the target function. | |
template<typename Func, typename Obj, typename... Args> | |
auto | handleExceptions (Func &&f, Obj &&obj, Args &&... args) -> std::optional< decltype((obj.*f)(std::forward< Args >(args)...))> |
Wrapper for class member functions. Catches specific exception types and sends an error message to the gui if an exception was thrown. | |
void | updateSettings () |
Updates the settings file with the current state of this object. | |
void | updateState () |
Updates the internal state of this object to the state stored in the settings file. | |
bool | appIndexIsValid (int app_id, bool show_error=true) |
Checks if given app_id is part of apps_ and optionally emits an error signal. | |
bool | deployerIndexIsValid (int app_id, int deployer, bool show_error=true) |
Checks if given deployer id is valid for given app and optionally emits an error signal. | |
void | handleAddAppError (int code, std::filesystem::path staging_dir) |
If the code indicates an error: Create an error message and emit it using sendError. | |
void | handleAddDeployerError (int code, std::filesystem::path staging_dir, std::filesystem::path dest_dir, const std::string &error_message) |
If the code indicates an error: Create an error message and emit it using sendError. | |
void | handleParseError (std::string path, std::string message) |
Emits an error message indicating a parsing error using sendError. | |
void | sendUpdateProgress (float progress) |
Informs about the progress in the current task by emitting updateProgress. | |
void | sendLogMessage (Log::LogLevel level, QString message) |
Emits logMessage with the given data. | |
Private Attributes | |
std::vector< ModdedApplication > | apps_ |
Contains every ModdedApplication handled by this object. | |
bool | throw_exceptions_ = false |
If true: Do not catch exceptions. | |
Static Private Attributes | |
static int | number_of_instances_ = 0 |
Counter for the number of instances of this class. | |
Contains several ModdedApplication objects and provides access to their functions using Qt's signal/ slot mechanism.
This is intended to be run inside of a worker thread, therefore public functions are implemented as Qt slots and emit Qt signals instead of returning a value directly. The internal state of this object is stored in a JSON file in the user directory, usually in "~/.local/share/linux_mod_manager/lmm_apps.json". Warning: To ensure all actions are completed as intended, use Qt::QueuedConnection as type for all connections. Do not instantiate more than one object of this class.
|
explicit |
Constructor. Only one instance of this class is support at a time.
parent | This is passed to the constructor of QObject. |
std::runtime_error | Indicates that another instance of this class exists. |
|
slot |
Adds a new application.
info | Contains all data needed to add a new application, e.g. its name. |
|
slot |
Adds a new backup for the given target for the given ModdedApplication by copying the currently active backup.
app_id | Target app. |
target_id | Target for which to create a new backup. |
name | Display name for the new backup. |
source | Backup from which to copy files to create the new backup. If -1: copy currently active backup. |
|
slot |
Adds a new target file or directory to be managed by the BackupManager of given ModdedApplication.
app_id | Target app. |
path | Path to the target file or directory. |
name | Display name for this target. |
default_backup | Display name for the currently active version of the target. |
first_backup | If not empty: Create a backup of the target with this as name. |
|
slot |
Adds a new Deployer of given type to given application.
app_id | The target application. |
info | Contains all data needed to add a new deployer, e.g. its name. |
|
slot |
Adds a new tag with the given name to the given ModdedApplication. Fails if a tag by that name already exists.
app_id | Target app. |
tag_name | Name for the new tag. |
std::runtime_error | If a tag by that name exists. |
|
slot |
Adds a mod to an existing group of an application.
app_id | The target application. |
mod_id | The mod's id. |
group | The target group. |
|
slot |
Adds the given mod to the ignore list of the given ReverseDeployer.
app_id | Target app. |
deployer | Target deployer. |
mod_id | Mod to be ignored. |
|
slot |
Adds a new profile to one application and optionally copies it's load order from an existing profile.
app_id | The target application. |
info | Contains data for the new profile. |
|
slot |
Adds the given tag to all given mods for the given ModdedApplication.
app_id | Target app. |
tag_name | Target tags name. |
mod_ids | Target mod ids. |
|
slot |
Adds a new tool to given application.
app_id | The target application. |
tool | The new Tool. |
|
private |
Checks if given app_id is part of apps_ and optionally emits an error signal.
app_id | Target app id. |
show_error | If true: Emit sendError. if app id is invalid. |
|
slot |
Applies the given mod action to the given mod.
app_id | Target app. |
deployer | Target deployer. |
action | Action to be applied. |
mod_id | Target mod. |
|
slot |
Changes the active member of given group of an application to given mod.
app_id | The target application. |
group | Target group. |
mod_id | The new active member. |
|
slot |
Moves a mod from one position in the load order to another for given Deployer for given application.
app_id | The target application. |
deployer | The target Deployer. |
from_index | Index of mod to be moved. |
to_index | Destination index. |
|
slot |
Changes the name of the given tag to the given new name for the given ModdedApplication. Fails if a tag by the given name exists.
app_id | Target app. |
old_name | Name of the target tag. |
new_name | Target tags new name. |
std::runtime_error | If a tag with the given new_name exists. |
|
slot |
Setter for a mod name.
app_id | The target application. |
mod_id | Target mod. |
new_name | The new name. |
|
slot |
Sets the given mod's version to the given new version for one application.
app_id | The target application. |
mod_id | Target mod. |
new_version | The new version. |
|
slot |
Checks for available mod updates on NexusMods.
app_id | App for which mod updates are to be checked. |
|
slot |
Checks for available updates for the given mod for the given app.
app_id | Target app. |
mod_ids | Ids of the mods for which to check for updates. |
|
signal |
Emitted after potentially slow operations, e.g. installing a mod, are completed.
message | Status message to show in the main window. |
|
slot |
Creates a new group containing the two given mods for one application. A group is a set of mods where only one member, the active member, will be deployed.
app_id | The target application. |
first_mod_id | First mod. This will be the active member of the new group. |
second_mod_id | Second mod. |
|
private |
Checks if given deployer id is valid for given app and optionally emits an error signal.
app_id | Target app id. |
deployer | Target deployer. |
show_error | If true: Emit sendError. if deployer id is invalid. |
|
slot |
Deploys mods using all Deployer objects of one application.
app_id | The target application. |
|
slot |
Deploys mods for given deployers and given application.
app_id | Target application. |
deployer_ids | Target deployers. |
|
signal |
Signals successful completion of a mod download.
app_id | App for which the mod has been downloaded. |
mod_id | Id of the mod for which the file is to be downloaded. This is the limo internal mod id, NOT the NexusMods id. |
file_path | Path to the downloaded file. |
mod_url | Url from which the mod was downloaded. |
|
slot |
Downloads a mod from nexusmods using the given nxm_url.
app_id | App for which the mod is to be downloaded. The mod is downloaded to the apps staging directory. |
nxm_url | Url containing all information needed for the download. |
|
slot |
Downloads the file with the given id for the given mod url from nexusmods.
app_id | App for which the mod is to be downloaded. The mod is downloaded to the apps staging directory. |
mod_id | Id of the mod for which the file is to be downloaded. This is the Limo internal mod id, NOT the NexusMods id. |
nexus_file_id | File id of the mod. |
mod_url | Url to the mod page on NexusMods. |
|
slot |
Edits an application and optionally moves all of it's mods to a new directory.
info | Contains all data needed to edit an application, e.g. its new name. |
app_id | The target application. |
|
slot |
Performes the given tag editing actions for the given ModdedApplication.
app_id | Target app. |
actions | Editing actions. |
|
slot |
Used to set type, name and target directory for one deployer of one application.
info | Contains all data needed to edit a deployer, e.g. its new name. |
app_id | The target application. |
deployer | Target Deployer. |
|
slot |
Performes the given tag editing actions for the given ModdedApplication.
app_id | Target app. |
actions | Editing actions. |
|
slot |
Sets a mods local and remote source to the given values for the given ModdedApplication.
app_id | App to which the edited mod belongs. |
mod_id | Target mod id. |
local_source | Path to a local archive or directory used for mod installation. |
remote_source | Remote URL from which the mod was downloaded. |
|
slot |
Used to set the name of a profile for one application.
app_id | The target application. |
profile | Target Profile |
info | Contains the new data for the profile. |
|
slot |
Used to replace an existing to with a now one for a application.
app_id | The target application. |
tool_id | Target tool. |
new_tool | The new tool. |
void ApplicationManager::enableExceptions | ( | bool | enabled | ) |
Enable or disable throwing exceptions.
enabled | New status. |
|
slot |
Exports configurations for the given deployers and the given auto tags to a json file. Does not include mods.
app_id | Target app. |
deployers | Deployers to export. |
auto_tags | Auto tags to export. |
|
signal |
Signals that external changes to files for given app for given deployer have been handled.
app_id | Target app. |
deployer | Target deployer. |
num_deployers | The total number of deployers for the target app. |
deploy | If True: Deploy mods after checking, else: Undeploy mods. |
|
slot |
Extracts the given archive to the given location.
app_id | application for which the mod is to be extracted. |
mod_id | Id of the mod for which the file is to be extracted or -1 if this is a new mod. |
source | Source path. |
target | Extraction target path. |
remote_source | URL from where the mod was downloaded. |
version | If not empty: Use this to overwrite the default version. |
name | If not empty: Use this to overwrite the default name. |
|
signal |
Emitted after archive extraction is complete.
app_id | application for which the mod has been extracted. |
mod_id | Id of the mod for which the file was to be extracted or -1 if this is a new mod. |
success | False if exception has been thrown. |
extracted_path | Path to which the mod was extracted. |
local_source | Source archive for the mod. |
remote_source | URL from where the mod was downloaded. |
version | If not empty: Use this to overwrite the default version. |
name | If not empty: Use this to overwrite the default name. |
|
slot |
Creates AppInfo for given application. Emits sendAppInfo.
app_id | The target application. |
|
slot |
Emits sendApplicationNames.
is_new | Indicates whether this was called after adding a new application. |
|
slot |
Returns a vector containing information about all managed backup targets of given ModdedApplication. Emits sendBackupTargets.
app_id | Target app. |
|
slot |
Creates DeployerInfo for one Deployer for one application. Emits sendDeployerInfo.
app_id | The target application. |
deployer | Target deployer. |
|
slot |
Creates a vector containing the names of all Deployer objects for one application. Emits sendDeployerNames.
app_id | The target application. |
is_new | Indicates if this was called after a new deployer was added. |
|
slot |
Checks if files deployed by the given app by the given deployer have been externally overwritten.
app_id | Target app. |
deployer | Deployer to check. |
deploy | If True: Deploy mods after checking, else: Undeploy mods. |
|
slot |
Checks for file conflicts of given mod with all other mods in the load order for one Deployer of one application. Emits sendFileConflicts.
app_id | The target application. |
deployer | The target Deployer |
mod_id | Mod to be checked. |
show_disabled | If true: Also check for conflicts with disabled mods. |
|
slot |
Checks for conflicts with other mods for one Deployer of one application. Two mods are conflicting if they share at least one file. Emits sendModConflicts.
app_id | The target application. |
deployer | Target Deployer. |
mod_id | The mod to be checked. |
|
slot |
Creates a vector containing information about all installed mods, stored in ModInfo objects for one application. Emits sendModInfo.
app_id | The target application. |
|
slot |
Fetches data for the given mod from NexusMods.
app_id | App to which the mod belongs. |
mod_id | Target mod id. |
int ApplicationManager::getNumProfiles | ( | int | app_id | ) | const |
Returns the number of profiles for one application.
app_id | Application for which to get the number of profiles. |
|
slot |
Creates a vector containing the names of all profiles of one application. Emits sendProfileNames.
app_id | The target application. |
|
private |
If the code indicates an error: Create an error message and emit it using sendError.
code | The error code. |
staging_dir | The applications staging directory. |
|
private |
If the code indicates an error: Create an error message and emit it using sendError.
code | The error code. |
staging_dir | The application's staging directory. |
dest_dir | The Deployer's target directory. |
error_message | A more detailed error message (if an error occured). |
|
inlineprivate |
Wrapper for class member functions. Catches specific exception types and sends an error message to the gui if an exception was thrown.
f | Function to run. |
obj | Object of a class that contains f as member function. |
args | Arguments for the function. |
|
inlineprivate |
Wrapper for member functions of ModdedApplication. Calls the function specified in the template for the ModdedApplication stored at apps_[app_id] with the given arguments and handles all exceptions thrown by the target function.
app_id | Target app id. |
args | Arguments which are passed to the function. |
|
private |
Emits an error message indicating a parsing error using sendError.
path | Path to the file causing this error. |
message | Message of the exception thrown during parsing. |
|
slot |
Installs a new mod for one application using the given Installer type.
app_id | The target application. |
info | Contains all data needed to install the mod. |
|
slot |
Keeps or reverts external changes for one app for one deployer. For every given file: Moves the modified file into the source mods directory and links it back in, if the changes are to be kept. Else: Deletes that file and restores the original link.
app_id | Target app. |
deployer | Target deployer. |
changes_to_keep | Contains paths to modified files, the id of the mod currently responsible for that file and a bool which indicates whether or not changes to that file should be kept. |
deploy | If True: Deploy mods after checking, else: Undeploy mods. |
|
signal |
Sends a log message to the logging window.
log_level | Type of message. |
message | Message to be displayed. |
|
signal |
Signals mod installation has been completed.
success | If true: Installation was successful. |
|
slot |
Deletes all files in the dest backup and replaces them with the files from the source backup for the given ModdedApplication.
app_id | Target app. |
target_id | Backup target. |
source_backup | Backup from which to copy files. |
dest_backup | Target for data deletion. |
|
slot |
Reapplies all auto tags for all mods for the given ModdedApplication.
app_id | Target app. |
|
slot |
Removes an application and optionally deletes all installed mods and the settings file in the application's staging directory.
app_id | The target application. |
cleanup | Indicates if mods and settings file should be deleted. |
|
slot |
Deletes the given backup for given target for given ModdedApplication.
app_id | Target app. |
target_id | Target from which to delete a backup. |
backup_id | Backup to remove. |
|
slot |
Removes the given backup target from the given ModdedApplication by deleting all relevant backups and config files.
app_id | Target app. |
target_id | Target to remove. |
|
slot |
Removes a Deployer from an application.
app_id | Target application. |
deployer | Target Deployer. |
cleanup | If true: Remove all currently deployed files and restore backups. |
|
slot |
Removes the tag with the given name, if it exists, from the given ModdedApplication.
app_id | Target app. |
tag_name | Tag to be removed. |
|
slot |
Removes a mod from the load order for given Deployer for given application.
app_id | The target application. |
deployer | The target Deployer |
mod_id | Id of the mod to be removed. |
|
slot |
Removes a mod from it's group for one application.
app_id | The target application. |
mod_id | Target mod. |
|
slot |
Removes a profile from an application.
app_id | The target application. |
profile | The profile to be removed. |
|
slot |
Removes the given tag from the given mods for the given ModdedApplication.
app_id | Target app. |
tag_name | Target tags name. |
mod_ids | Target mod ids. |
|
slot |
Removes a tool from given application.
app_id | The target application. |
tool_id | The tool's id. |
|
signal |
Sends AppInfo for one application.
The | AppInfo. |
|
signal |
Sends a list containing all application names.
names | The list of names. |
icon_paths | Paths to application icons. |
is_new | Indicates whether this was emitted after adding a new application. |
|
signal |
Sends a vector containing info about all backup targets managed by given ModdedApplication.
targets | The targets. |
|
signal |
Sends DeployerInfo for one deployer of one application.
depl_info | The DeployerInfo. |
|
signal |
Sends the names of all deployers.
names | The deployer names. |
is_new | Indicates whether this signal was emitted after adding a new deployer. |
|
signal |
Sends an error message.
title | The title of the message window. |
message | The error message. |
|
signal |
Sends data about externally modified files for one app for one deployer.
app_id | Target app. |
info | Contains data about modified files. |
num_deployers | The total number of deployers for the target app. |
deploy | If True: Deploy mods after checking, else: Undeploy mods. |
|
signal |
Sends file conflicts for one mod for one deployer of one application.
conflicts | A vector containing the conflicts information. |
|
signal |
Sends the load order for one deployer of one application.
loadorder | The load order. |
|
private |
void ApplicationManager::sendLogMessage | ( | Log::LogLevel | log_level, |
const std::string & | message ) |
Sends a log message to the logging window.
log_level | Type of message. |
message | Message to be displayed. |
|
signal |
Sends mod conflicts for one mod for one deployer of one application.
Contains | every mod id in conflict. |
|
signal |
Sends ModInfo for one application.
mod_info | The mod info. |
|
signal |
Sends NexusMods data for a specific mod.
app_id | App to which the mod belongs. |
mod_id | Target mod id. |
page | Contains all data for the mod. |
|
signal |
Sends a list of all profile names for one application.
names | The profile names. |
is_new | Indicates whether this was emitted after adding a new profile. |
|
private |
Informs about the progress in the current task by emitting updateProgress.
progress | The progress. |
|
slot |
Changes the currently active backup for the given target for the given ModdedApplication.
app_id | Target app. |
target_id | Target for which to change the active backup. |
backup_id | New active backup. |
|
slot |
Changes the name of the given backup for the given target for the given ModdedApplication.
app_id | Target app. |
target_id | Backup target. |
backup_id | Backup to be edited. |
name | The new name. |
|
slot |
Changes the name of the given backup target for the given ModdedApplication.
app_id | Target app. |
target_id | Backup target. |
name | The new name. |
|
slot |
Enables or disables the given mod in the load order for given Deployer for given application.
app_id | The target application. |
deployer | The target Deployer |
mod_id | Mod to be edited. |
status | The new status. |
|
slot |
Sets the currently active profile for given application.
app_id | The target application. |
profile | The new profile. |
|
slot |
Sets the tags for all given mods to the given tags for the given ModdedApplication.
app_id | Target app. |
tag_names | Names of the new tags. |
mod_ids | Target mod ids. |
|
slot |
Sorts the load order by grouping mods which contain conflicting files.
app_id | Target app. |
deployer | Target deployer. |
|
slot |
Temporarily disables update notifications for the given mods.
app_id | Target app. |
mod_ids | Ids of the mods for which update notifications are to be disabled. |
|
slot |
Undeploys mods using all Deployer objects of one application.
app_id | The target application. |
|
slot |
Undeploys mods for given deployers and given application.
app_id | Target application. |
deployer_ids | Target deployers. |
|
slot |
Uninstalls all mods which are inactive group members of any group which contains any of the given mods for the given ModdedApplication.
app_id | Target app. |
mod_ids | Ids of the mods for which to uninstall group members. |
|
slot |
Uninstalls the given mods for one application, this includes deleting all installed files.
app_id | The target application. |
mod_ids | Ids of the mods to be uninstalled. |
installer_type | The Installer type used. If an empty string is given, the Installer used during installation is used. |
|
slot |
Reapplies all auto tags to the given mods for the given ModdedApplication.
app_id | Target app. |
mod_ids | Ids of the mods to which auto tags are to be reapplied. |
|
slot |
Updates the file ignore list for ReverseDeployers.
app_id | Target app. |
deployer | Target deployer. |
|
slot |
Updates which deployer should manage given mods.
app_id | The target application. |
mod_id | Vector of mod ids to be added. |
deployers | Bool for every deployer, indicating if the mods should be managed by that deployer. |
|
signal |
Informs about the progress in the current task.
progress | The progress. |