Limo
A simple mod manager
Loading...
Searching...
No Matches
MainWindow Class Reference

Represents the main window of the application and contains slots for all GUI elements and its widgets. More...

#include <mainwindow.h>

Inheritance diagram for MainWindow:
Collaboration diagram for MainWindow:

Public Types

enum  LogFrame { LOG_MAIN = 0 , LOG_TOOLS = 1 }
 Describes target widgets for logging. More...
 

Public Slots

void onModAdded (QList< QUrl > paths)
 Called when files are dragged into the application. Stores paths to all files and begins installation.
 
void onAddModDialogAccept (int app_id, AddModInfo info)
 Installs a new mod.
 
void onDeployerBoxChange (int mod_id, bool status)
 Called when a mod gets disabled/ enabled in ui->deployer_list. Updates the mods state.
 
void onGetModInfo (std::vector< ModInfo > mod_info)
 Calls updateModList with new data.
 
void onGetDeployerInfo (DeployerInfo depl_info)
 Calls updateDeployerList with new data.
 
void onAddAppDialogComplete (EditApplicationInfo info)
 Adds a new application.
 
void onAddDeployerDialogComplete (EditDeployerInfo info, int app_id)
 Adds a new Deployer.
 
void onGetApplicationNames (QStringList names, QStringList icon_paths, bool is_new)
 Updates the application combo box with new ModdedApplication names.
 
void onGetDeployerNames (QStringList names, bool is_new)
 Updates the Deployer combo box with new deployer names.
 
void onModListContextMenu (QPoint pos)
 Called on right clicking in ui->mod_list. Shows a context menu at the given position.
 
void onDeployerListContextMenu (QPoint pos)
 Called on right clicking in ui->deployer_list. Shows a context menu at the given position.
 
void onAddToDeployerAccept (std::vector< int > &mod_ids, std::vector< bool > deployers)
 Updates which deployers should manage given mods.
 
void onCompletedOperations (QString message="")
 Hides the progress bar and shows the given status message.
 
void onGetFileConflicts (std::vector< ConflictInfo > conflicts)
 Shows a ConflictsWidget window containing given file conflict information.
 
void onGetAppInfo (AppInfo app_info)
 Updates the "App" tab.
 
void onApplicationEdited (EditApplicationInfo info, int app_id)
 Updates an application and optionally moves all of it's mods to a new directory.
 
void onDeployerEdited (EditDeployerInfo info, int app_id, int deployer)
 Updates type, name and target directory for one deployer of one application.
 
void onGetModConflicts (std::unordered_set< int > conflicts)
 Filters ui->mod_list so that it only show conflicting mods.
 
void onModMoved (int from, int to)
 Moves a mod in the current load order.
 
void onGetProfileNames (QStringList names, bool is_new)
 Updates the profile combo box with new profile names.
 
void onProfileAdded (int app_id, EditProfileInfo info)
 Adds a new profile to the given application and optionally copies it's load order from an existing profile.
 
void onProfileEdited (int app_id, int profile, EditProfileInfo info)
 Changes the name of the given profile.
 
void onProfileRemoved ()
 Deletes the currently active profile.
 
void onModAddedToGroup (int mod_id, int target_id)
 Adds the given mod to the given group.
 
void onAddModAborted (QString temp_dir)
 Called when "cancel" button is pressed during mod installation. Clears all pending mod installations.
 
void onModMovedTo (int from, int to)
 Called when a mod has been moved to a different position using the MoveModDialog.
 
void onExtractionComplete (int app_id, int mod_id, bool success, QString extracted_path, QString local_source, QString remote_source, QString version, QString name)
 Called after archive has been extracted. Installs the newly extracted mod.
 
void onSettingsDialogComplete ()
 Called when the settings dialog has completed. Updates state with new settings.
 
void onGetBackupInfo (std::vector< BackupTarget > backups)
 Updates the backups tab with new data.
 
void onBackupTargetAdded (int app_id, QString name, QString path, QString default_backup, QString first_backup)
 Called when the AddBackupTargetDialog has been completed.
 
void onBackupListContextMenu (QPoint pos)
 Called on right clicking in ui->backup_list. Shows a context menu at the given position.
 
void onBackupAdded (int app_id, int target, QString name, QString target_name, int source)
 Called when the AddBackupDialog has been accepted. Adds a new backup to an existing target.
 
void resizeModListColumns ()
 Resizes the mod list columns to fit the current contents.
 
void resizeDeployerListColumns ()
 Resizes the deployer list columns to fit the current contents.
 
void setupProgressBar ()
 Initializes the progress bar and adds it to the status bar.
 
void setupFilters ()
 Initializes ui elements used to filter lists.
 
void setupIcons ()
 Initializes some ui icons.
 

Signals

void getModInfo (int app_id)
 Creates a vector containing information about all installed mods, stored in ModInfo objects for one application.
 
void addApplication (EditApplicationInfo info)
 Adds a new application.
 
void addDeployer (int app_id, EditDeployerInfo info)
 Adds a new Deployer of given type to given application.
 
void getDeployerInfo (int app_id, int deployer)
 Creates DeployerInfo for one Deployer for one 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 updateModDeployers (int app_id, std::vector< int > mod_ids, std::vector< bool > deployers)
 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 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 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 using given Deployers of one 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 using given Deployers of one application.
 
void getApplicationNames (bool is_new)
 Updates Entries in the application combo box.
 
void getDeployerNames (int app_id, bool is_new)
 Updates Entries in the Deployer combo box.
 
void removeDeployer (int app_id, int deployer, bool cleanup)
 Removes a Deployer from an 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 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.
 
void getAppInfo (int app_id)
 Creates AppInfo for given application.
 
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.
 
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.
 
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 an archive to target directory.
 
void getBackupInfo (int app_id)
 Requests info about backups for one ModdedApplication.
 
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 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 scrollLists ()
 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 editManualTags (int app_id, std::vector< EditManualTagAction > actions)
 Signals that the given editing actions are to be performed on the manual tags of 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 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 editAutoTags (int app_id, std::vector< EditAutoTagAction > actions)
 Signals that the given editing actions are to be performed on the auto tags of 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 file_id, QString mod_url)
 Downloads a mod from nexusmods using the given mod_url. Only works if the given api key belongs to a premium user.
 
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.
 

Public Member Functions

 MainWindow (QWidget *parent=nullptr)
 Constructor. Initializes the UI elements and restores their state from a file. Creates an ApplicationManager object and moves it to a worker thread. Communication with the thread is done using Qt's signal/ slot mechanism.
 
 ~MainWindow ()
 Destructor. Stops the worker thread and performs cleanup.
 
void closeEvent (QCloseEvent *event) override
 Store the GUI state in a QSettings file before closing the window.
 
void setCmdArgument (std::string argument)
 Checks if the given argument is a NexusMods download link. If True: Downloads the mod.
 
void setDebugMode (bool enabled)
 Enables/ disables printing of debug log messages.
 
void initChangelog ()
 Initializes the changelogdialog. Show the dialog if current version > version on last start.
 

Private Slots

void on_deploy_button_clicked ()
 Deploys all mods for the currently active ModdedApplication.
 
void onAddAppButtonClicked ()
 Shows a dialog to add a new ModdedApplication.
 
void on_app_selection_box_currentIndexChanged (int index)
 Updates the currently active ModdedApplication.
 
void onAddDeployerButtonClicked ()
 Shows a dialog to add a new Deployer.
 
void on_deployer_selection_box_currentIndexChanged (int index)
 Updates the currently active Deployer.
 
void onRemoveDeployerButtonClicked ()
 Deletes the currently active Deployer.
 
void onRemoveAppButtonClicked ()
 Deletes the currently active ModdedApplication.
 
void on_actionadd_to_deployer_triggered ()
 Shows a dialog to add the currently selected mod to a Deployer.
 
void on_actionremove_from_deployer_triggered ()
 Removes the currently selected mod from the current Deployer.
 
void on_actionget_file_conflicts_triggered ()
 Generates file conflicts for currently selected mod.
 
void onEditDeployerPressed ()
 Shows a dialog to edit the currently active Deployer.
 
void onAddToolClicked ()
 Shows a dialog to add a new tool.
 
void onLaunchAppButtonClicked ()
 Launches the current application.
 
void on_edit_app_button_clicked ()
 Shows a dialog to edit the currently active ModdedApplication.
 
void on_search_field_textEdited (const QString &text)
 Applies the search field text as a filter to ui->mod_list and ui->deployer_list.
 
void on_actionget_mod_conflicts_triggered ()
 Filters mods such that only those in conflict with the currently selected mod are visible .
 
void on_reset_filter_button_clicked ()
 Resets filters such that lists show all mods.
 
void on_actionmove_mod_triggered ()
 Shows a dialog to move the currently selected mod to a new position in the load order.
 
void onEditDeployerMenuClicked ()
 Shows a dialog to edit the currently active Deployer.
 
void on_profile_selection_box_currentIndexChanged (int index)
 Updates the currently active profile.
 
void onAddProfileButtonClicked ()
 Shows a dialog to add a new profile.
 
void onEditProfileButtonClicked ()
 Shows a dialog to edit the currently active profile.
 
void onRemoveProfileButtonClicked ()
 Removes the currently active profile.
 
void onReceiveError (QString title, QString message)
 Shows a message box displaying an error.
 
void on_actionAdd_to_Group_triggered ()
 Adds a dialog to add the currently selected mod to a group.
 
void on_actionRemove_from_Group_triggered ()
 Removes the currently selected mod from its group.
 
void on_actionbrowse_mod_files_triggered ()
 Opens the file explorer at the staging directory of the selected mod.
 
void on_actionbrowse_deployer_files_triggered ()
 Opens the file explorer at the target directory of the selected deployer.
 
void on_actionSort_Mods_triggered ()
 Sorts and colors mods by conflicts groups.
 
void onLogButtonPressed ()
 Toggles log window visibility.
 
void onReceiveLogMessage (Log::LogLevel log_level, QString message)
 Shows the received message in the log.
 
void onModVersionEdited (int mod_id, QString version)
 Notifies app_manager_ of version change.
 
void onActiveGroupMemberChanged (int group, int mod_id)
 Notifies app_manager_ of active group member change.
 
void onModNameChanged (int mod_id, QString name)
 Notifies app_manager_ to change the name of the given mod.
 
void onModRemoved (int mod_id, QString name)
 Notifies app_manager_ to remove the mod in the currently selected mod.
 
void on_settings_button_clicked ()
 Shows the settings dialog.
 
void onAddBackupTargetClicked ()
 Called when the add backup target button has been clicked.
 
void onActiveBackupChanged (int target, int backup)
 Called when the index of a backup combo box changes. Updates the active backup.
 
void onBackupNameEdited (int target, int backup, QString name)
 Called when the name of a backup was edited by the user.
 
void onBackupTargetRemoveClicked (int target, QString name)
 Called when a remove backup target button has been clicked.
 
void onBackupTargetNameEdited (int target, QString name)
 Called when the name of a backup target was edited by the user.
 
void on_actionAdd_Backup_triggered ()
 Adds a new backup to the currently selected target.
 
void on_actionRemove_Backup_triggered ()
 Removes the currently active backup from the currently selected target.
 
void on_app_tab_widget_currentChanged (int index)
 Disabled or enables some actions based on the current tab.
 
void on_actionBrowse_backup_files_triggered ()
 Opens the default file manager at the location of the selected backup.
 
void on_actionOverwrite_Backup_triggered ()
 Opens a OverWriteBackupDialog.
 
void onBackupOverwritten (int target_id, int source_backup, int dest_backup)
 Emits overwriteBackup.
 
void onScrollLists ()
 Used to synchronize scrolling in lists with the event queue. Scrolls deployer and mod list to their currently selected index.
 
void updateProgress (float progress)
 If progress bar is visible: Update it with the given progress.
 
void on_actionRemove_Mods_triggered ()
 Removes all selected mods.
 
void on_actionRemove_Other_Versions_triggered ()
 Removes all group members of the currently selected mod, except for the active one.
 
void onAddAppDialogFinished (int return_code)
 Enables actions for modifying apps.
 
void onAddDeployerDialogFinished (int return_code)
 Enables actions for modifying deployers and apps.
 
void onAddBackupTargetDialogFinished (int return_code)
 Enables actions for modifying backups and apps.
 
void onBusyDialogAborted ()
 Called when a dialog, which requires the busy status to be set, was aborted. Sets busy status to false.
 
void onAddProfileDialogFinished (int return_code)
 Enables actions for modifying profiles and apps.
 
void on_filters_button_clicked ()
 Toggles visibility of the filters widget.
 
void on_filter_active_mods_cb_stateChanged (int state)
 Adds/ removes the inactive mods filter to the mod list proxy.
 
void on_filter_group_mods_cb_stateChanged (int state)
 Adds/ removes the mods in groups filter to the mod list proxy.
 
void on_filter_active_mods_depl_cb_stateChanged (int state)
 Adds/ removes the mods in groups filter to the deployer list proxy.
 
void on_edit_manual_tags_button_clicked ()
 Opens the EditManualTagsDialog window.
 
void onManualTagsEdited (int app_id, std::vector< EditManualTagAction > actions)
 Called by the edit_manual_tags_dialog_ when editing is completed.
 
void onManualModTagsUpdated (int app_id, QStringList tags, std::vector< int > mod_ids, int mode)
 Updates the manual tags for all given mods.
 
void on_actionEdit_Tags_for_mods_triggered ()
 Opens the manage_manual_tags_dialog_ for all currently selected mods.
 
void onModManualTagFilterChanged (QString tag, int state)
 Updates the mod_list filter with the new state for the given tag.
 
void onDeplTagFilterChanged (QString tag, int state)
 Updates the deployer_list filter with the new state for the given tag.
 
void on_edit_auto_tags_button_clicked ()
 Opens the EditAutoTagsDialog.
 
void onAutoTagsEdited (int app_id, std::vector< EditAutoTagAction > actions)
 Called by the edit_auto_tags_dialog_ when editing is completed.
 
void on_update_auto_tags_button_clicked ()
 Reapplies all auto tags.
 
void on_actionUpdate_Tags_triggered ()
 Reapplies tags to the currently selected mods.
 
void on_actionEdit_Mod_Sources_triggered ()
 Shows the EditModSourcesDialog for the currently selected mod.
 
void onModSourcesEdited (int app_id, int mod_id, QString local_source, QString remote_source)
 Updates local and remote mod sources for the given mod.
 
void on_actionShow_Nexus_Page_triggered ()
 Shows data from NexusMods for the currently selected mod.
 
void onGetNexusPage (int app_id, int mod_id, nexus::Page page)
 Shows a NexusModDialog with data from the given page.
 
void onReceiveIpcMessage (QString message)
 Called by the IPC server when a message from another Limo instance was received. If the message contains a nexus mod nxm link: Downloads the respective mod.
 
void onDownloadComplete (int app_id, int mod_id, QString file_path, QString mod_url)
 Begins extraction of downloaded mod.
 
void onModDownloadRequested (int app_id, int mod_id, int file_id, QString mod_url, QString version)
 Downloads a mod from nexusmods using the given mod_url. Only works if the given api key belongs to a premium user.
 
void onDownloadFailed ()
 Cancels installation of the pending mod.
 
void on_actionReinstall_From_Local_triggered ()
 Reinstalls the currently selected mod from the local source.
 
void on_check_mod_updates_button_clicked ()
 Checks for updates for all mods for the current application.
 
void on_actionSelect_All_triggered ()
 Selects all mods in the mods_tab.
 
void on_filter_mods_with_updates_cb_stateChanged (int state)
 Adds a filter to the mod list for updated mods depending on the new check sate.
 
void on_actionCheck_For_Updates_triggered ()
 Checks for available updates for the selected mods.
 
void on_actionSuppress_Update_triggered ()
 Temporarily disables the update notification for all selected mods.
 
void onModInstallationComplete (bool success)
 Proceeds with the next mod import, if the queue is not empty.
 
void onGetExternalChangesInfo (int app_id, ExternalChangesInfo info, int num_deployers, bool deploy)
 If at least one file has been changed: Show a ExternalChangesDialog. Afterwards, get external changes for other deployers. If there are none: Begin deployment.
 
void onExternalChangesHandled (int app_id, int deployer, int num_deployers, bool deploy)
 Gets external changes for other deployers. If there are none: Begin deployment.
 
void onExternalChangesDialogCompleted (int app_id, int deployer, const FileChangeChoices &changes_to_keep, bool deploy)
 Called when the ExternalChangesDialog has been completed sucessfully. Emits keepOrRevertFileModifications.
 
void onExternalChangesDialogAborted ()
 Called when the ExternalChangesDialog has been aborted. Cancels deployment.
 
void on_export_app_config_button_clicked ()
 Opens the export_app_config_dialog_.
 
void onExportAppConfigDialogComplete (int app_id, std::vector< int > deployers, QStringList auto_tags)
 Emits exportAppConfiguration.
 
void on_undeploy_button_clicked ()
 Checks for external changes and reverts mod deployment.
 
void onUpdateIgnoredFiles (int app_id, int deployer)
 Updates the file ignore list for ReverseDeployers.
 
void on_actionAdd_to_Ignore_List_triggered ()
 Adds the currently selected mod in the deployer list to the ignore list of the current ReverseDeployer.
 
void onLaunchToolButtonPressed (int row, int col)
 Launches the tool to which this button belongs.
 
void onEditToolButtonPressed (int row, int col)
 Edits the tool to which this button belongs.
 
void onRemoveToolButtonPressed (int row, int col)
 Deletes the tool to which this button belongs.
 
void onToolAdded (int app_id, Tool tool)
 Adds a new tool with the given data.
 
void onToolEdited (int app_id, int tool_id, Tool tool)
 Replaces the given tool with the given new tool.
 
void onModActionTriggered (int action)
 Emits applyModAction for the given action.
 

Private Member Functions

void setupConnections ()
 Creates signal/ slot connections between this and the ApplicationManager.
 
void setupLists ()
 Initializes ui->mod_list and ui->deployer_list and creates connections.
 
void setupMenus ()
 Initializes context menus.
 
void setupDialogs ()
 Initializes all reusable dialogs.
 
void updateModList (const std::vector< ModInfo > &mod_info)
 Updates ui->mod_list with new data.
 
void updateDeployerList (const DeployerInfo &depl_info)
 Updates ui->mod_list with new data.
 
int currentApp ()
 Returns the currently active ModdedApplication.
 
int currentDeployer ()
 Returns the currently active Deployer.
 
int currentProfile ()
 Returns the currently active profile.
 
void filterModList ()
 Applies current search filter to ui->mod_list.
 
void filterDeployerList ()
 Applies current search and conflicts filters to ui->deployer_list.
 
void setupButtons ()
 Initializes all buttons belonging to this window.
 
void showEditDeployerDialog (int deployer)
 Initializes and shows a dialog used to edit the given deployer.
 
void importMod ()
 Extracts or downloads the next mod in mod_import_targets_.
 
void setBusyStatus (bool busy, bool show_progress_bar=true, bool disable_app_launch=false)
 Sets the visibility status of the progress bar and disabled various UI elements while the ApplicationManager is busy.
 
int getColumnIndex (QTableWidget *table, QString col_name)
 Returns the index of the given column name for the given QTableWidget.
 
void setStatusMessage (QString message, int timeout_ms=0)
 Sets a message for the status bar.
 
void setupLog ()
 Initializes the log frame and button.
 
QPair< QString, int > runCommand (QString command, bool ignore_flatpak=false)
 Runs the given command and returns its output and return code.
 
void runConcurrent (QString command, QString name, QString type, bool ignore_flatpak=false)
 Runs the given command in a separate thread and prints its output to the log.
 
void loadSettings ()
 Loads all stored settings from the settings file and updates the respective values.
 
void setTabWidgetStyleSheet ()
 Generates and sets the style sheet for ui->app_tab_widget.
 
std::vector< bool > getAutonomousDeployers ()
 Returns a vector of bools indicating for each deployer if that deployer is autonomous.
 
void enableModifyApps (bool enabled)
 Enables/ Disables actions which allow for the removal, adding or editing of applications.
 
void enableModifyDeployers (bool enabled)
 Enables/ Disables actions which allow for the removal, adding or editing of deployers and apps.
 
void enableModifyBackups (bool enabled)
 Enables/ Disables actions which allow for the removal, adding or editing of backups and backup targets.
 
void enableModifyProfiles (bool enabled)
 Enables/ Disables actions which allow for the removal, adding or editing of profiles and applications.
 
bool initNexusApiKey ()
 Initializes the NexusMods API key from the values stored in the settings file.
 
void setupIpcServer ()
 Initializes the QLocalServer used for communications with other Limo instances.
 
void initUiWithoutApps (bool has_apps)
 Disables/ enables UI elements in case no applications exist.
 
void checkForContainers ()
 Checks the environmet for signs that Limo is running in a container, like flatpak.
 
void updateOutdatedSettings ()
 Checks the current settings for outdated entries and adepts those as needed.
 
bool versionIsLessOrEqual (QString current_version, QString target_version)
 Compares two version strings by priority according to their position in the string. Version strings must contain only numbers and ".". Earlier numbers have higher priority, separated by "." chatacers. Example: 20.5.4 > 2.1.4.
 

Private Attributes

Ui::MainWindow * ui
 Contains auto-generated ui elements.
 
bool move_button_pressed_ = false
 True if the button used to reorder load orders is being pressed.
 
int move_button_row_ = 0
 Stores the row containing the currently held down move button for load orders.
 
ApplicationManagerapp_manager_
 Handles installation and deployment of all mods. Runs in a separate thread.
 
QThread * worker_thread_
 Thread containing the ApplicationManager.
 
bool ignore_table_changes_ = false
 If true: changes to ui->mod_list will not trigger table updates.
 
bool is_initialized_ = false
 Indicates whether ui->deployer_list has been initialized.
 
QString search_term_ = ""
 Matched against mod names to filter the mod- and deployer lists.
 
QMenu * mod_list_menu_
 Context menu for ui->mod_list.
 
QMenu * deployer_list_menu_
 Context menu for ui->deployer_list.
 
QMenu * backup_list_menu_
 Context menu for ui->backup_list.
 
QAction * run_app_action_
 Action used to run the current application.
 
QAction * add_app_action_
 Action used to add a new application.
 
QAction * remove_app_action_
 Action used to remove the current application.
 
QAction * edit_app_action_
 Action used to edit the current application.
 
QAction * add_deployer_action_
 Action used to add a new deployer.
 
QAction * remove_deployer_action_
 Action used to remove the current deployer.
 
QAction * edit_deployer_action_
 Action used to edit the current deployer.
 
QAction * add_profile_action_
 Action used to add a new profile.
 
QAction * remove_profile_action_
 Action used to remove a profile.
 
QAction * edit_profile_action_
 Action used to edit the current profile.
 
bool ignore_tool_changes_ = false
 If true: changes to ui->info_tool_list will not trigger table updates.
 
bool ask_remove_from_deployer_ = true
 If true: Show confirmation box before removing a Deployer.
 
bool ask_remove_mod_ = true
 If true: Show confirmation box before removing a mod.
 
bool ask_remove_profile_ = true
 If true: Show confirmation box before removing a profile.
 
bool ask_remove_backup_target_ = true
 If true: Show confirmation box before removing a backup target.
 
bool ask_remove_backup_ = true
 If true: Show confirmation box before removing a backup.
 
bool ask_remove_tool_ = true
 If true: Show confirmation box before removing a tool.
 
std::unique_ptr< AddAppDialogadd_app_dialog_
 Reusable dialog for adding new applications.
 
std::unique_ptr< AddDeployerDialogadd_deployer_dialog_
 Reusable dialog for adding new deployers.
 
std::unique_ptr< AddModDialogadd_mod_dialog_
 Reusable dialog for adding new mods.
 
std::unique_ptr< AddProfileDialogadd_profile_dialog_
 Reusable dialog for adding new profiles.
 
std::unique_ptr< AddToDeployerDialogadd_to_deployer_dialog_
 Reusable dialog for adding a mod to a Deployer.
 
std::unique_ptr< AddToolDialogadd_tool_dialog_
 Reusable dialog for adding new tools.
 
std::unique_ptr< QMessageBox > message_box_
 Used to show info or error messages.
 
std::unique_ptr< AddToGroupDialogadd_to_group_dialog_
 Reusable dialog for adding a mod to a group.
 
std::unique_ptr< SettingsDialogsettings_dialog_
 Reusable settings dialog.
 
std::unique_ptr< AddBackupTargetDialogadd_backup_target_dialog_
 Reusable dialog for adding new backup targets.
 
std::unique_ptr< AddBackupDialogadd_backup_dialog_
 Reusable dialog for adding new backups to existing targets.
 
std::unique_ptr< OverwriteBackupDialogoverwrite_backup_dialog_
 Reusable dialog for overwriting backups.
 
std::unique_ptr< EditManualTagsDialogedit_manual_tags_dialog_
 Reusable dialog for editing manual tags.
 
std::unique_ptr< ManageModTagsDialogmanage_mod_tags_dialog_
 Reusable dialog for managing the manual tags assigned to a set of mods.
 
std::unique_ptr< EditAutoTagsDialogedit_auto_tags_dialog_
 Reusable dialog for editing auto tags.
 
std::unique_ptr< EditModSourcesDialogedit_mod_sources_dialog_
 Reusable dialog for editing local and remote mod source paths.
 
std::unique_ptr< NexusModDialognexus_mod_dialog_
 Reusable dialog for displaying NexusMods data for a mod.
 
std::unique_ptr< ExternalChangesDialogexternal_changes_dialog_
 Reusable dialog for displaying external changes to files.
 
std::unique_ptr< ExportAppConfigDialogexport_app_config_dialog_
 Reusable dialog for exporting the configuration of the current app.
 
std::unique_ptr< ChangelogDialogchangelog_dialog_
 Reusable dialog for showing changelogs.
 
int last_mod_list_index_ = -1
 Stores the index in ui->mod_list of a mod before being added to a group.
 
std::priority_queue< ImportModInfomod_import_queue_
 Contains all queued mods to be downloaded or extracted.
 
int deployer_list_slider_pos_ = 0
 Last position of the scroll bar for ui->deployer_list.
 
int mod_list_slider_pos_ = 0
 Last position of the scroll bar for ui->mod_list.
 
const QString temp_dir_ = "lmm_tmp_extract_.dir"
 Temporary directory used for file extractions.
 
DeployerListModeldeployer_model_
 Model used by the deployer list.
 
ModListModelmod_list_model_
 Model used by the mod list.
 
VersionBoxDelegateversion_deledate_
 Used to edit mod versions in the mod list.
 
ModNameDelegatemod_name_delegate_
 Used to edit mod names in the mod list.
 
ModListProxyModelmod_list_proxy_
 Proxy model for the mod list.
 
DeployerListProxyModeldeployer_list_proxy_
 Proxy model for the deployer list.
 
BackupListModelbackup_list_model_
 Model used by the backup list.
 
VersionBoxDelegatebackup_delegate_
 Used to edit the active backup in the backup list.
 
BackupNameDelegatebackup_target_name_delegate_
 Used to edit the name of backup targets.
 
TableCellDelegatemod_list_cell_delegate_
 Delegate used to draw cells in ui->mod_list.
 
TableCellDelegatedeployer_list_cell_delegate_
 Delegate used to draw cells in ui->deployer_list.
 
TableCellDelegatebackup_list_cell_delegate_
 Delegate used to draw cells in ui->backup_list.
 
ConflictsModelconflicts_model_
 Model used to hold data for file conflicts.
 
QWidget * conflicts_window_
 Holds conflicts_list_.
 
QTableView * conflicts_list_
 Used to display file conflicts.
 
QProgressBar * progress_bar_
 Progress bar shown in the status bar.
 
std::map< std::string, int > num_mods_per_manual_tag_
 Maps the names of all manual tags for the current app to the number of mods with that tag.
 
std::vector< TagCheckBox * > manual_tag_cbs_
 Pointers to all checkboxes used to filter the mod list by manual tags.
 
std::vector< TagCheckBox * > depl_tag_cbs_
 Pointers to all checkboxes used to filter the deployer list by tags.
 
std::map< std::string, int > num_mods_per_auto_tag_
 Maps the names of all manual tags for the current app to the number of mods with that tag.
 
std::vector< TagCheckBox * > auto_tag_cbs_
 Pointers to all checkboxes used to filter the mod list by auto tags.
 
std::map< std::string, std::pair< std::string, std::vector< TagCondition > > > auto_tags_
 Maps all auto tag names of the current app to a pair of the expression used and a vector of Tagconditions.
 
bool deploy_for_all_ = true
 If true: Deploy button starts deployment for all deployers, else: Only for the currently active one.
 
bool show_log_on_error_ = false
 If true: Show the log window when an error is logged.
 
bool show_log_on_warning_ = false
 If true: Show the log window when a warning is logged.
 
std::unique_ptr< IpcServeripc_server_
 QLocalServer wrapper used for communication with other instances of Limo.
 
std::chrono::time_point< std::chrono::high_resolution_clock > last_progress_update_time_
 Timestamp representing the last time the progress bar has been updated.
 
float last_progress_
 The last progress state.
 
bool received_progress_ = false
 Tracks whether a progress signals has been received since the last busy action started.
 
bool debug_mode_ = false
 If true: Print debug messages.
 
bool is_a_flatpak_ = false
 Indicates if Limo is running as a flatpak.
 
std::vector< QString > deployer_source_paths_
 For every current deployer: The source path it uses.
 
std::vector< QString > deployer_target_paths_
 For every current deployer: The target path it uses.
 
std::vector< Tooltools_
 Contains all tools managed by the current app.
 
std::vector< ListAction * > deployer_mod_actions_
 Contains additional mod actions to be added to the deployer list context menu for the current deployer.
 
QString previous_app_version_
 APP_VERSION the last time the app was run.
 

Static Private Attributes

static constexpr int app_tab_idx = 0
 Index of the app tab.
 
static constexpr int mods_tab_idx = 1
 Index of the app tab.
 
static constexpr int deployer_tab_idx = 2
 Index of the app tab.
 
static constexpr int backup_tab_idx = 3
 Index of the app tab.
 
static const QString deploy_mode_hard_link = "Hard Link"
 Display string for hard link deployment.
 
static const QString deploy_mode_sym_link = "Sym Link"
 Display string for sym link deployment.
 
static const QString deploy_mode_copy = "Copy"
 Display string for copy deployment.
 

Detailed Description

Represents the main window of the application and contains slots for all GUI elements and its widgets.

Member Enumeration Documentation

◆ LogFrame

Describes target widgets for logging.

Enumerator
LOG_MAIN 

Main logging widget.

LOG_TOOLS 

Logging widget for tools.

Constructor & Destructor Documentation

◆ MainWindow()

MainWindow::MainWindow ( QWidget * parent = nullptr)

Constructor. Initializes the UI elements and restores their state from a file. Creates an ApplicationManager object and moves it to a worker thread. Communication with the thread is done using Qt's signal/ slot mechanism.

Parameters
parentThe parent widget of this object.

Member Function Documentation

◆ addApplication

void MainWindow::addApplication ( EditApplicationInfo info)
signal

Adds a new application.

Parameters
infoContains all data needed to add a new application, e.g. its name.

◆ addBackup

void MainWindow::addBackup ( int app_id,
int target_id,
QString name,
int source )
signal

Adds a new backup for the given target for the given ModdedApplication by copying the currently active backup.

Parameters
app_idTarget app.
target_idTarget for which to create a new backup.
nameDisplay name for the new backup.
sourceBackup from which to copy files to create the new backup. If -1: copy currently active backup.

◆ addBackupTarget

void MainWindow::addBackupTarget ( int app_id,
QString path,
QString name,
QString default_backup,
QString first_backup )
signal

Adds a new target file or directory to be managed by the BackupManager of given ModdedApplication.

Parameters
app_idTarget app.
pathPath to the target file or directory.
nameDisplay name for this target.
default_backupDisplay name for the currently active version of the target.
first_backupIf not empty: Create a backup of the target with this as name.

◆ addDeployer

void MainWindow::addDeployer ( int app_id,
EditDeployerInfo info )
signal

Adds a new Deployer of given type to given application.

Parameters
app_idThe target application.
infoContains all data needed to create a new deployer, e.g. its name.

◆ addModToGroup

void MainWindow::addModToGroup ( int app_id,
int mod_id,
int group )
signal

Adds a mod to an existing group of an application.

Parameters
app_idThe target application.
mod_idThe mod's id.
groupThe target group.

◆ addModToIgnoreList

void MainWindow::addModToIgnoreList ( int app_id,
int deployer,
int mod_id )
signal

Adds the given mod to the ignore list of the given ReverseDeployer.

Parameters
app_idTarget app.
deployerTarget deployer.
mod_idMod to be ignored.

◆ addProfile

void MainWindow::addProfile ( int app_id,
EditProfileInfo info )
signal

Adds a new profile to one application and optionally copies it's load order from an existing profile.

Parameters
app_idThe target application.
infoContains data for the new profile.

◆ addTagsToMods

void MainWindow::addTagsToMods ( int app_id,
QStringList tag_names,
const std::vector< int > & mod_ids )
signal

Adds the given tag to all given mods for the given ModdedApplication.

Parameters
app_idTarget app.
tag_nameTarget tags name.
mod_idsTarget mod ids.

◆ addTool

void MainWindow::addTool ( int app_id,
Tool tool )
signal

Adds a new tool to given application.

Parameters
app_idThe target application.
toolThe new tool.

◆ applyModAction

void MainWindow::applyModAction ( int app_id,
int deployer,
int action,
int mod_id )
signal

Applies the given mod action to the given mod.

Parameters
app_idTarget app.
deployerTarget deployer.
actionAction to be applied.
mod_idTarget mod.

◆ changeActiveGroupMember

void MainWindow::changeActiveGroupMember ( int app_id,
int group,
int mod_id )
signal

Changes the active member of given group of an application to given mod.

Parameters
app_idThe target application.
groupTarget group.
mod_idThe new active member.

◆ changeLoadorder

void MainWindow::changeLoadorder ( int app_id,
int deployer,
int from_idx,
int to_idx )
signal

Moves a mod from one position in the load order to another for given Deployer for given application.

Parameters
app_idThe target application.
deployerThe target Deployer.
from_indexIndex of mod to be moved.
to_indexDestination index.

◆ changeModName

void MainWindow::changeModName ( int app_id,
int mod_id,
QString new_name )
signal

Setter for a mod name.

Parameters
app_idThe target application.
mod_idTarget mod.
new_nameThe new name.

◆ changeModVersion

void MainWindow::changeModVersion ( int app_id,
int mod_id,
QString new_version )
signal

Sets the given mod's version to the given new version for one application.

Parameters
app_idThe target application.
mod_idTarget mod.
new_versionThe new version.

◆ checkForModUpdates

void MainWindow::checkForModUpdates ( int app_id)
signal

Checks for available mod updates on NexusMods.

Parameters
app_idApp for which mod updates are to be checked.

◆ checkModsForUpdates

void MainWindow::checkModsForUpdates ( int app_id,
const std::vector< int > & mod_ids )
signal

Checks for available updates for the given mod for the given app.

Parameters
app_idTarget app.
mod_idsIds of the mods for which to check for updates.

◆ closeEvent()

void MainWindow::closeEvent ( QCloseEvent * event)
override

Store the GUI state in a QSettings file before closing the window.

Parameters
eventThe close event sent upon closing the application.

◆ createGroup

void MainWindow::createGroup ( int app_id,
int first_mod_id,
int second_mod_id )
signal

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.

Parameters
app_idThe target application.
first_mod_idFirst mod. This will be the active member of the new group.
second_mod_idSecond mod.

◆ currentApp()

int MainWindow::currentApp ( )
private

Returns the currently active ModdedApplication.

Returns
The active ModdedApplication.

◆ currentDeployer()

int MainWindow::currentDeployer ( )
private

Returns the currently active Deployer.

Returns
The active Deployer.

◆ currentProfile()

int MainWindow::currentProfile ( )
private

Returns the currently active profile.

Returns
The active profile.

◆ deployMods

void MainWindow::deployMods ( int app_id)
signal

Deploys mods using all Deployer objects of one application.

Parameters
app_idThe target application.

◆ deployModsFor

void MainWindow::deployModsFor ( int app_id,
std::vector< int > deployer_ids )
signal

Deploys mods using given Deployers of one application.

Parameters
app_idThe target application.
deployer_idsTarget Deployer ids.

◆ downloadMod

void MainWindow::downloadMod ( int app_id,
QString nxm_url )
signal

Downloads a mod from nexusmods using the given nxm_url.

Parameters
app_idApp for which the mod is to be downloaded. The mod is downloaded to the apps staging directory.
nxm_urlUrl containing all information needed for the download.

◆ downloadModFile

void MainWindow::downloadModFile ( int app_id,
int mod_id,
int file_id,
QString mod_url )
signal

Downloads a mod from nexusmods using the given mod_url. Only works if the given api key belongs to a premium user.

Parameters
app_idApp for which the mod is to be downloaded. The mod is downloaded to the apps staging directory.
mod_idId of the mod for which the file is to be downloaded. This is the limo internal mod id, NOT the NexusMods id.
file_idNexusMods file id of the target file.
mod_urlUrl to the NexusMods page of the mod.

◆ editApplication

void MainWindow::editApplication ( EditApplicationInfo info,
int app_id )
signal

Edits an application and optionally moves all of it's mods to a new directory.

Parameters
infoContains all data needed to edit the application, e.g. its new name.
app_idThe target application.

◆ editAutoTags

void MainWindow::editAutoTags ( int app_id,
std::vector< EditAutoTagAction > actions )
signal

Signals that the given editing actions are to be performed on the auto tags of the given ModdedApplication.

Parameters
app_idTarget app.
actionsEditing actions.

◆ editDeployer

void MainWindow::editDeployer ( EditDeployerInfo info,
int app_id,
int deployer )
signal

Used to set type, name and target directory for one deployer of one application.

Parameters
infoContains all data needed to edit a deployer, e.g. its new name.
app_idThe target application.
deployerTarget Deployer.

◆ editManualTags

void MainWindow::editManualTags ( int app_id,
std::vector< EditManualTagAction > actions )
signal

Signals that the given editing actions are to be performed on the manual tags of the given ModdedApplication.

Parameters
app_idTarget app.
actionsEditing actions.

◆ editModSources

void MainWindow::editModSources ( int app_id,
int mod_id,
QString local_source,
QString remote_source )
signal

Sets a mods local and remote source to the given values for the given ModdedApplication.

Parameters
app_idApp to which the edited mod belongs.
mod_idTarget mod id.
local_sourcePath to a local archive or directory used for mod installation.
remote_sourceRemote URL from which the mod was downloaded.

◆ editProfile

void MainWindow::editProfile ( int app_id,
int profile,
EditProfileInfo info )
signal

Used to set the name of a profile for one application.

Parameters
app_idThe target application.
profileTarget Profile
infoContains the new data for the profile.

◆ editTool

void MainWindow::editTool ( int app_id,
int tool_id,
Tool new_tool )
signal

Used to replace an existing to with a now one for a application.

Parameters
app_idThe target application.
tool_idTarget tool.
new_toolThe new tool.

◆ enableModifyApps()

void MainWindow::enableModifyApps ( bool enabled)
private

Enables/ Disables actions which allow for the removal, adding or editing of applications.

Parameters
enabledThe new status for the actions.

◆ enableModifyBackups()

void MainWindow::enableModifyBackups ( bool enabled)
private

Enables/ Disables actions which allow for the removal, adding or editing of backups and backup targets.

Parameters
enabledThe new status for the actions.

◆ enableModifyDeployers()

void MainWindow::enableModifyDeployers ( bool enabled)
private

Enables/ Disables actions which allow for the removal, adding or editing of deployers and apps.

Parameters
enabledThe new status for the actions.

◆ enableModifyProfiles()

void MainWindow::enableModifyProfiles ( bool enabled)
private

Enables/ Disables actions which allow for the removal, adding or editing of profiles and applications.

Parameters
enabledThe new status for the actions.

◆ exportAppConfiguration

void MainWindow::exportAppConfiguration ( int app_id,
std::vector< int > deployers,
QStringList auto_tags )
signal

Exports configurations for the given deployers and the given auto tags to a json file. Does not include mods.

Parameters
app_idTarget app.
deployersDeployers to export.
auto_tagsAuto tags to export.

◆ extractArchive

void MainWindow::extractArchive ( int app_id,
int mod_id,
QString source,
QString target,
QString remote_source,
QString version,
QString name )
signal

Extracts an archive to target directory.

Parameters
app_idapplication for which the mod has been extracted.
mod_idId of the mod for which the file is to be extracted or -1 if this is a new mod.
sourceSource path.
targetTarget path
remote_sourceURL from where the mod was downloaded.
versionIf not empty: Use this to overwrite the default version.
nameIf not empty: Use this to overwrite the default name.

◆ getAppInfo

void MainWindow::getAppInfo ( int app_id)
signal

Creates AppInfo for given application.

Parameters
app_idThe target application.

◆ getApplicationNames

void MainWindow::getApplicationNames ( bool is_new)
signal

Updates Entries in the application combo box.

Parameters
is_newIndicates whether this was called after adding a new application.

◆ getAutonomousDeployers()

std::vector< bool > MainWindow::getAutonomousDeployers ( )
private

Returns a vector of bools indicating for each deployer if that deployer is autonomous.

Returns
The vector.

◆ getBackupInfo

void MainWindow::getBackupInfo ( int app_id)
signal

Requests info about backups for one ModdedApplication.

Parameters
app_idTarget app.

◆ getColumnIndex()

int MainWindow::getColumnIndex ( QTableWidget * table,
QString col_name )
private

Returns the index of the given column name for the given QTableWidget.

Parameters
tableTarget table.
col_nameName of the column.
Returns
The index or -1 if none was found.

◆ getDeployerInfo

void MainWindow::getDeployerInfo ( int app_id,
int deployer )
signal

Creates DeployerInfo for one Deployer for one application.

Parameters
app_idThe target application.
deployerTarget deployer.

◆ getDeployerNames

void MainWindow::getDeployerNames ( int app_id,
bool is_new )
signal

Updates Entries in the Deployer combo box.

Parameters
app_idTarget application.
is_newIndicates whether this was called after adding a new Deployer.

◆ getExternalChanges

void MainWindow::getExternalChanges ( int app_id,
int deployer,
bool deploy )
signal

Checks if files deployed by the given app by the given deployer have been externally overwritten.

Parameters
app_idTarget app.
deployerDeployer to check.
deployIf True: Deploy mods after checking, else: Undeploy mods.

◆ getFileConflicts

void MainWindow::getFileConflicts ( int app_id,
int deployer,
int mod_id,
bool show_disabled )
signal

Checks for file conflicts of given mod with all other mods in the load order for one Deployer of one application.

Parameters
app_idThe target application.
deployerThe target Deployer
mod_idMod to be checked.
show_disabledIf true: Also check for conflicts with disabled mods.

◆ getModConflicts

void MainWindow::getModConflicts ( int app_id,
int deployer,
int mod_id )
signal

Checks for conflicts with other mods for one Deployer of one application. Two mods are conflicting if they share at least one file.

Parameters
app_idThe target application.
deployerTarget Deployer.
mod_idThe mod to be checked.

◆ getModInfo

void MainWindow::getModInfo ( int app_id)
signal

Creates a vector containing information about all installed mods, stored in ModInfo objects for one application.

Parameters
app_idThe target application.

◆ getNexusPage

void MainWindow::getNexusPage ( int app_id,
int mod_id )
signal

Fetches data for the given mod from NexusMods.

Parameters
app_idApp to which the mod belongs.
mod_idTarget mod id.

◆ getProfileNames

void MainWindow::getProfileNames ( int app_id,
bool is_new )
signal

Creates a vector containing the names of all profiles of one application.

Parameters
app_idThe target application.

◆ initNexusApiKey()

bool MainWindow::initNexusApiKey ( )
private

Initializes the NexusMods API key from the values stored in the settings file.

Returns
True if initialization was successful.

◆ initUiWithoutApps()

void MainWindow::initUiWithoutApps ( bool has_apps)
private

Disables/ enables UI elements in case no applications exist.

Parameters
has_appsIf false: Disables various elements used to edit apps, else: Enable the elements.

◆ installMod

void MainWindow::installMod ( int app_id,
AddModInfo info )
signal

Installs a new mod for one application using the given Installer type.

Parameters
app_idThe target application.
infoContains all data needed to install the mod.

◆ keepOrRevertFileModifications

void MainWindow::keepOrRevertFileModifications ( int app_id,
int deployer,
const FileChangeChoices & changes_to_keep,
bool deploy )
signal

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.

Parameters
app_idTarget app.
deployerTarget deployer.
modified_filesContains 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.
deployIf True: Deploy mods after checking, else: Undeploy mods.

◆ on_app_tab_widget_currentChanged

void MainWindow::on_app_tab_widget_currentChanged ( int index)
privateslot

Disabled or enables some actions based on the current tab.

Parameters
indexNew index.

◆ on_filter_active_mods_cb_stateChanged

void MainWindow::on_filter_active_mods_cb_stateChanged ( int state)
privateslot

Adds/ removes the inactive mods filter to the mod list proxy.

Parameters
stateThe checkbox state. If this is unchecked, the relevant filters will be removed. If this is checked, only inactive mods will be shown. If this is partially checked, only active mods will be shown.

◆ on_filter_active_mods_depl_cb_stateChanged

void MainWindow::on_filter_active_mods_depl_cb_stateChanged ( int state)
privateslot

Adds/ removes the mods in groups filter to the deployer list proxy.

Parameters
stateThe checkbox state. If this is unchecked, the relevant filters will be removed. If this is checked, only inactive mods will be shown. If this is partially checked, only active mods will be shown.

◆ on_filter_group_mods_cb_stateChanged

void MainWindow::on_filter_group_mods_cb_stateChanged ( int state)
privateslot

Adds/ removes the mods in groups filter to the mod list proxy.

Parameters
stateThe checkbox state. If this is unchecked, the relevant filters will be removed. If this is checked, only mods without groups will be shown. If this is partially checked, only mods with groups will be shown.

◆ on_filter_mods_with_updates_cb_stateChanged

void MainWindow::on_filter_mods_with_updates_cb_stateChanged ( int state)
privateslot

Adds a filter to the mod list for updated mods depending on the new check sate.

Parameters
stateNew check state. Filters for mods with updates if this is checked, filters for mods without updates if partially checked and removes the filter in unchecked.

◆ onActiveBackupChanged

void MainWindow::onActiveBackupChanged ( int target,
int backup )
privateslot

Called when the index of a backup combo box changes. Updates the active backup.

Parameters
targetBackup target.
backupNew active backup.

◆ onActiveGroupMemberChanged

void MainWindow::onActiveGroupMemberChanged ( int group,
int mod_id )
privateslot

Notifies app_manager_ of active group member change.

Parameters
groupTarget group.
mod_idNew active member.

◆ onAddAppDialogComplete

void MainWindow::onAddAppDialogComplete ( EditApplicationInfo info)
slot

Adds a new application.

Parameters
infoContains all data entered in the dialog.

◆ onAddAppDialogFinished

void MainWindow::onAddAppDialogFinished ( int return_code)
privateslot

Enables actions for modifying apps.

Parameters
return_codeIndicates whether the dialog was completed successfully.

◆ onAddBackupTargetDialogFinished

void MainWindow::onAddBackupTargetDialogFinished ( int return_code)
privateslot

Enables actions for modifying backups and apps.

Parameters
return_codeIndicates whether the dialog was completed successfully.

◆ onAddDeployerDialogComplete

void MainWindow::onAddDeployerDialogComplete ( EditDeployerInfo info,
int app_id )
slot

Adds a new Deployer.

Parameters
infoContains all data entered in the dialog.
app_idTarget application.

◆ onAddDeployerDialogFinished

void MainWindow::onAddDeployerDialogFinished ( int return_code)
privateslot

Enables actions for modifying deployers and apps.

Parameters
return_codeIndicates whether the dialog was completed successfully.

◆ onAddModAborted

void MainWindow::onAddModAborted ( QString temp_dir)
slot

Called when "cancel" button is pressed during mod installation. Clears all pending mod installations.

Parameters
app_idPath to the directory used for extracting the mod archive.

◆ onAddModDialogAccept

void MainWindow::onAddModDialogAccept ( int app_id,
AddModInfo info )
slot

Installs a new mod.

Parameters
app_idApplication for which the new mod is to be installed.
infoContains all data needed to install the mod.

◆ onAddProfileDialogFinished

void MainWindow::onAddProfileDialogFinished ( int return_code)
privateslot

Enables actions for modifying profiles and apps.

Parameters
return_codeIndicates whether the dialog was completed successfully.

◆ onAddToDeployerAccept

void MainWindow::onAddToDeployerAccept ( std::vector< int > & mod_ids,
std::vector< bool > deployers )
slot

Updates which deployers should manage given mods.

Parameters
mod_idTarget mods.
deployersBool for every deployer, indicating if the mods should be managed by that deployer.

◆ onApplicationEdited

void MainWindow::onApplicationEdited ( EditApplicationInfo info,
int app_id )
slot

Updates an application and optionally moves all of it's mods to a new directory.

Parameters
infoContains all data entered in the dialog.
app_idThe target application.

◆ onAutoTagsEdited

void MainWindow::onAutoTagsEdited ( int app_id,
std::vector< EditAutoTagAction > actions )
privateslot

Called by the edit_auto_tags_dialog_ when editing is completed.

Parameters
app_idTarget app.
actionsContains all editing actions to be performed.

◆ onBackupAdded

void MainWindow::onBackupAdded ( int app_id,
int target,
QString name,
QString target_name,
int source )
slot

Called when the AddBackupDialog has been accepted. Adds a new backup to an existing target.

Parameters
app_idTarget app.
targetTarget for which to add a new backup.
nameBackup name.
target_nameName of the target for which to create a new backup.
sourceBackup from which to copy files to create the new backup. If -1: copy currently active backup.

◆ onBackupListContextMenu

void MainWindow::onBackupListContextMenu ( QPoint pos)
slot

Called on right clicking in ui->backup_list. Shows a context menu at the given position.

Parameters
posTarget position for menu.

◆ onBackupNameEdited

void MainWindow::onBackupNameEdited ( int target,
int backup,
QString name )
privateslot

Called when the name of a backup was edited by the user.

Parameters
targetBackup target.
backupEdited backup.
nameThe new name.

◆ onBackupOverwritten

void MainWindow::onBackupOverwritten ( int target_id,
int source_backup,
int dest_backup )
privateslot

Emits overwriteBackup.

Parameters
target_idId of the backup target for which to overwrite a backup.
source_backupBackup from which to copy files.
dest_backupBackup to be overwritten.

◆ onBackupTargetAdded

void MainWindow::onBackupTargetAdded ( int app_id,
QString name,
QString path,
QString default_backup,
QString first_backup )
slot

Called when the AddBackupTargetDialog has been completed.

Parameters
app_idApplication to which the new backup target is to be added.
nameName of the new backup target.
pathPath to the file or directory to be managed.
default_backupName of the currently active version of the target.
first_backupIf not empty: Name of the first backup.

◆ onBackupTargetNameEdited

void MainWindow::onBackupTargetNameEdited ( int target,
QString name )
privateslot

Called when the name of a backup target was edited by the user.

Parameters
targetBackup target.
nameThe new name.

◆ onBackupTargetRemoveClicked

void MainWindow::onBackupTargetRemoveClicked ( int target,
QString name )
privateslot

Called when a remove backup target button has been clicked.

Parameters
targetBackup target to be removed.
nameName of the target.

◆ onBusyDialogAborted

void MainWindow::onBusyDialogAborted ( )
privateslot

Called when a dialog, which requires the busy status to be set, was aborted. Sets busy status to false.

Parameters
return_codeIndicates whether the dialog was completed successfully.

◆ onCompletedOperations

void MainWindow::onCompletedOperations ( QString message = "")
slot

Hides the progress bar and shows the given status message.

Parameters
messageStatus message to show.

◆ onDeployerBoxChange

void MainWindow::onDeployerBoxChange ( int mod_id,
bool status )
slot

Called when a mod gets disabled/ enabled in ui->deployer_list. Updates the mods state.

Parameters
mod_idTarget mod.
statusNew mod status.

◆ onDeployerEdited

void MainWindow::onDeployerEdited ( EditDeployerInfo info,
int app_id,
int deployer )
slot

Updates type, name and target directory for one deployer of one application.

Parameters
infoContains all data entered in the edit dialog.
app_idThe target application.
deployerTarget Deployer.

◆ onDeployerListContextMenu

void MainWindow::onDeployerListContextMenu ( QPoint pos)
slot

Called on right clicking in ui->deployer_list. Shows a context menu at the given position.

Parameters
posTarget position for menu.

◆ onDeplTagFilterChanged

void MainWindow::onDeplTagFilterChanged ( QString tag,
int state )
privateslot

Updates the deployer_list filter with the new state for the given tag.

Parameters
tagTag used as filter.
stateNew check box state. If == Qt::Checked, tag is filtered out, if == Qt::PartiallyChecked only mods with this tags are shown.

◆ onDownloadComplete

void MainWindow::onDownloadComplete ( int app_id,
int mod_id,
QString file_path,
QString mod_url )
privateslot

Begins extraction of downloaded mod.

Parameters
app_idApp for which the mod has been downloaded.
mod_idIf !=-1: The downloaded mod should be added to this mods group after installation.
file_pathPath to the downloaded file.
mod_urlUrl from which the mod was downloaded.

◆ onEditToolButtonPressed

void MainWindow::onEditToolButtonPressed ( int row,
int col )
privateslot

Edits the tool to which this button belongs.

Parameters
rowRow of the button in the tools table.
colColumn of the button in the tools table.

◆ onExportAppConfigDialogComplete

void MainWindow::onExportAppConfigDialogComplete ( int app_id,
std::vector< int > deployers,
QStringList auto_tags )
privateslot

Emits exportAppConfiguration.

Parameters
app_idTarget app.
deployersDeployers to export.
auto_tagsAuto tags to export.

◆ onExternalChangesDialogCompleted

void MainWindow::onExternalChangesDialogCompleted ( int app_id,
int deployer,
const FileChangeChoices & changes_to_keep,
bool deploy )
privateslot

Called when the ExternalChangesDialog has been completed sucessfully. Emits keepOrRevertFileModifications.

Parameters
app_idTarget app.
deployerTarget deployer.
changes_to_keepContains 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.
deployIf True: Deploy mods after checking, else: Undeploy mods.

◆ onExternalChangesHandled

void MainWindow::onExternalChangesHandled ( int app_id,
int deployer,
int num_deployers,
bool deploy )
privateslot

Gets external changes for other deployers. If there are none: Begin deployment.

Parameters
app_idapplication for which changes have benn handled.
deployerDeployer for which changes have been handled.
num_deployersThe total number of deployers for the target app.
deployIf True: Deploy mods after checking, else: Undeploy mods.

◆ onExtractionComplete

void MainWindow::onExtractionComplete ( int app_id,
int mod_id,
bool success,
QString extracted_path,
QString local_source,
QString remote_source,
QString version,
QString name )
slot

Called after archive has been extracted. Installs the newly extracted mod.

Parameters
app_idTarget app for the mod.
mod_idId of the mod for which the file is to be extracted or -1 if this is a new mod.
successFalse when exception was thrown.
extracted_pathPath to which the mod was extracted.
local_sourceSource archive for the mod.
remote_sourceURL from where the mod was downloaded.
versionIf not empty: Use this to overwrite the default version.
nameIf not empty: Use this to overwrite the default name.

◆ onGetAppInfo

void MainWindow::onGetAppInfo ( AppInfo app_info)
slot

Updates the "App" tab.

Parameters
app_infoNew data used for the update.

◆ onGetApplicationNames

void MainWindow::onGetApplicationNames ( QStringList names,
QStringList icon_paths,
bool is_new )
slot

Updates the application combo box with new ModdedApplication names.

Parameters
namesThe new names.
icon_pathsPaths to application icons.
is_newIndicates if this was called after adding a new application.

◆ onGetBackupInfo

void MainWindow::onGetBackupInfo ( std::vector< BackupTarget > backups)
slot

Updates the backups tab with new data.

Parameters
Containsinformation about all managed backup targets.

◆ onGetDeployerInfo

void MainWindow::onGetDeployerInfo ( DeployerInfo depl_info)
slot

Calls updateDeployerList with new data.

Parameters
mod_infoThe new data displayed in ui->deployer_list.

◆ onGetDeployerNames

void MainWindow::onGetDeployerNames ( QStringList names,
bool is_new )
slot

Updates the Deployer combo box with new deployer names.

Parameters
namesThe new names.
is_newIndicates if this was called after adding a new deployer.

◆ onGetExternalChangesInfo

void MainWindow::onGetExternalChangesInfo ( int app_id,
ExternalChangesInfo info,
int num_deployers,
bool deploy )
privateslot

If at least one file has been changed: Show a ExternalChangesDialog. Afterwards, get external changes for other deployers. If there are none: Begin deployment.

Parameters
app_idapplication for which changes have been received.
infoContains data about externally modified files.
num_deployersThe total number of deployers for the target app.
deployIf True: Deploy mods after checking, else: Undeploy mods.

◆ onGetFileConflicts

void MainWindow::onGetFileConflicts ( std::vector< ConflictInfo > conflicts)
slot

Shows a ConflictsWidget window containing given file conflict information.

Parameters
conflictsConflicts to be shown.

◆ onGetModConflicts

void MainWindow::onGetModConflicts ( std::unordered_set< int > conflicts)
slot

Filters ui->mod_list so that it only show conflicting mods.

Parameters
conflictsContains conflicting mod ids.

◆ onGetModInfo

void MainWindow::onGetModInfo ( std::vector< ModInfo > mod_info)
slot

Calls updateModList with new data.

Parameters
mod_infoThe new data displayed in ui->mod_list.

◆ onGetNexusPage

void MainWindow::onGetNexusPage ( int app_id,
int mod_id,
nexus::Page page )
privateslot

Shows a NexusModDialog with data from the given page.

Parameters
pagePage with mod data.

◆ onGetProfileNames

void MainWindow::onGetProfileNames ( QStringList names,
bool is_new )
slot

Updates the profile combo box with new profile names.

Parameters
namesThe new names.
is_newIndicates if this was called after adding a new profile.

◆ onLaunchToolButtonPressed

void MainWindow::onLaunchToolButtonPressed ( int row,
int col )
privateslot

Launches the tool to which this button belongs.

Parameters
rowRow of the button in the tools table.
colColumn of the button in the tools table.

◆ onManualModTagsUpdated

void MainWindow::onManualModTagsUpdated ( int app_id,
QStringList tags,
std::vector< int > mod_ids,
int mode )
privateslot

Updates the manual tags for all given mods.

Parameters
app_idTarget app.
tagsTags to be applied to the given mods. All other tags are removed.
mod_idsMods the tags of which are to be updated.
modeIndicates whether tags should be added, removed or overwritten.

◆ onManualTagsEdited

void MainWindow::onManualTagsEdited ( int app_id,
std::vector< EditManualTagAction > actions )
privateslot

Called by the edit_manual_tags_dialog_ when editing is completed.

Parameters
app_idTarget app.
actionsContains all editing actions to be performed.

◆ onModActionTriggered

void MainWindow::onModActionTriggered ( int action)
privateslot

Emits applyModAction for the given action.

Parameters
actionAction to be applied to the current mod.

◆ onModAdded

void MainWindow::onModAdded ( QList< QUrl > paths)
slot

Called when files are dragged into the application. Stores paths to all files and begins installation.

Parameters
pathsPaths to added files.

◆ onModAddedToGroup

void MainWindow::onModAddedToGroup ( int mod_id,
int target_id )
slot

Adds the given mod to the given group.

Parameters
mod_idTarget mod.
target_idTarget group.

◆ onModDownloadRequested

void MainWindow::onModDownloadRequested ( int app_id,
int mod_id,
int file_id,
QString mod_url,
QString version )
privateslot

Downloads a mod from nexusmods using the given mod_url. Only works if the given api key belongs to a premium user.

Parameters
app_idApp for which the mod is to be downloaded. The mod is downloaded to the apps staging directory.
mod_idId of the mod for which the file is to be downloaded. This is the limo internal mod id, NOT the NexusMods id.
file_idNexusMods file id of the target file.
mod_urlUrl to the NexusMods page of the mod.
versionIf not empty: Use this to overwrite the default version.

◆ onModInstallationComplete

void MainWindow::onModInstallationComplete ( bool success)
privateslot

Proceeds with the next mod import, if the queue is not empty.

Parameters
successIf true: Installation was successful.

◆ onModListContextMenu

void MainWindow::onModListContextMenu ( QPoint pos)
slot

Called on right clicking in ui->mod_list. Shows a context menu at the given position.

Parameters
posTarget position for menu.

◆ onModManualTagFilterChanged

void MainWindow::onModManualTagFilterChanged ( QString tag,
int state )
privateslot

Updates the mod_list filter with the new state for the given tag.

Parameters
tagManual tag used as filter.
stateNew check box state. If == Qt::Checked, tag is filtered out, if == Qt::PartiallyChecked only mods with this tags are shown.

◆ onModMoved

void MainWindow::onModMoved ( int from,
int to )
slot

Moves a mod in the current load order.

Parameters
fromOriginal mod position.
toNew mod position.

◆ onModMovedTo

void MainWindow::onModMovedTo ( int from,
int to )
slot

Called when a mod has been moved to a different position using the MoveModDialog.

Parameters
fromOriginal position.
toNew position.

◆ onModNameChanged

void MainWindow::onModNameChanged ( int mod_id,
QString name )
privateslot

Notifies app_manager_ to change the name of the given mod.

Parameters
mod_idIf of target mod.
nameNew name.

◆ onModRemoved

void MainWindow::onModRemoved ( int mod_id,
QString name )
privateslot

Notifies app_manager_ to remove the mod in the currently selected mod.

Parameters
mod_idId of mod which is to be removed.
nameName of mod which is to be removed.

◆ onModSourcesEdited

void MainWindow::onModSourcesEdited ( int app_id,
int mod_id,
QString local_source,
QString remote_source )
privateslot

Updates local and remote mod sources for the given mod.

Parameters
app_idApp to which the edited mod belongs.
mod_idTarget mod id.
local_sourcePath to a local archive or directory used for mod installation.
remote_sourceRemote URL from which the mod was downloaded.

◆ onModVersionEdited

void MainWindow::onModVersionEdited ( int mod_id,
QString version )
privateslot

Notifies app_manager_ of version change.

Parameters
mod_idTarget mod id.
versionNew version.

◆ onProfileAdded

void MainWindow::onProfileAdded ( int app_id,
EditProfileInfo info )
slot

Adds a new profile to the given application and optionally copies it's load order from an existing profile.

Parameters
app_idTarget application
infoContains data for the new profile.

◆ onProfileEdited

void MainWindow::onProfileEdited ( int app_id,
int profile,
EditProfileInfo info )
slot

Changes the name of the given profile.

Parameters
app_idTarget application
profileTarget profile
infoContains the new data for the profile.

◆ onReceiveError

void MainWindow::onReceiveError ( QString title,
QString message )
privateslot

Shows a message box displaying an error.

Parameters
titleWindow title for the message box.
messageMessage to be displayed.

◆ onReceiveIpcMessage

void MainWindow::onReceiveIpcMessage ( QString message)
privateslot

Called by the IPC server when a message from another Limo instance was received. If the message contains a nexus mod nxm link: Downloads the respective mod.

Parameters
messageThe message.

◆ onReceiveLogMessage

void MainWindow::onReceiveLogMessage ( Log::LogLevel log_level,
QString message )
privateslot

Shows the received message in the log.

Parameters
log_levelLog level for the message.
messageMessage content.

◆ onRemoveToolButtonPressed

void MainWindow::onRemoveToolButtonPressed ( int row,
int col )
privateslot

Deletes the tool to which this button belongs.

Parameters
rowRow of the button in the tools table.
colColumn of the button in the tools table.

◆ onToolAdded

void MainWindow::onToolAdded ( int app_id,
Tool tool )
privateslot

Adds a new tool with the given data.

Parameters
app_idApp to which to add the tool.
toolThe new tool.

◆ onToolEdited

void MainWindow::onToolEdited ( int app_id,
int tool_id,
Tool tool )
privateslot

Replaces the given tool with the given new tool.

Parameters
app_idApp to which to add the tool.
tool_idTarget tool.
toolThe new tool.

◆ onUpdateIgnoredFiles

void MainWindow::onUpdateIgnoredFiles ( int app_id,
int deployer )
privateslot

Updates the file ignore list for ReverseDeployers.

Parameters
app_idTarget app.
deployerTarget deployer.

◆ overwriteBackup

void MainWindow::overwriteBackup ( int app_id,
int target_id,
int source_backup,
int dest_backup )
signal

Deletes all files in the dest backup and replaces them with the files from the source backup for the given ModdedApplication.

Parameters
app_idTarget app.
target_idBackup target.
source_backupBackup from which to copy files.
dest_backupTarget for data deletion.

◆ reapplyAutoTags

void MainWindow::reapplyAutoTags ( int app_id)
signal

Reapplies all auto tags for all mods for the given ModdedApplication.

Parameters
app_idTarget app.

◆ removeApplication

void MainWindow::removeApplication ( int app_id,
bool cleanup )
signal

Removes an application and optionally deletes all installed mods and the settings file in the application's staging directory.

Parameters
app_idThe target application.
cleanupIndicates if mods and settings file should be deleted.

◆ removeBackup

void MainWindow::removeBackup ( int app_id,
int target_id,
int backup_id )
signal

Deletes the given backup for given target for given ModdedApplication.

Parameters
app_idTarget app.
target_idTarget from which to delete a backup.
backup_idBackup to remove.

◆ removeBackupTarget

void MainWindow::removeBackupTarget ( int app_id,
int target_id )
signal

Removes the given backup target from the given ModdedApplication by deleting all relevant backups and config files.

Parameters
app_idTarget app.
target_idTarget to remove.

◆ removeDeployer

void MainWindow::removeDeployer ( int app_id,
int deployer,
bool cleanup )
signal

Removes a Deployer from an application.

Parameters
app_idTarget application.
deployerTarget Deployer.
cleanupIf true: Remove all currently deployed files and restore backups.

◆ removeModFromDeployer

void MainWindow::removeModFromDeployer ( int app_id,
int deployer,
int mod_id )
signal

Removes a mod from the load order for given Deployer for given application.

Parameters
app_idThe target application.
deployerThe target Deployer
mod_idId of the mod to be removed.

◆ removeModFromGroup

void MainWindow::removeModFromGroup ( int app_id,
int mod_id )
signal

Removes a mod from it's group for one application.

Parameters
app_idThe target application.
mod_idTarget mod.

◆ removeProfile

void MainWindow::removeProfile ( int app_id,
int profile )
signal

Removes a profile from an application.

Parameters
app_idThe target application.
profileThe profile to be removed.

◆ removeTagsFromMods

void MainWindow::removeTagsFromMods ( int app_id,
QStringList tag_names,
const std::vector< int > & mod_ids )
signal

Removes the given tag from the given mods for the given ModdedApplication.

Parameters
app_idTarget app.
tag_nameTarget tags name.
mod_idsTarget mod ids.

◆ removeTool

void MainWindow::removeTool ( int app_id,
int tool_id )
signal

Removes a tool from given application.

Parameters
app_idThe target application.
tool_idThe tool's id.

◆ runCommand()

QPair< QString, int > MainWindow::runCommand ( QString command,
bool ignore_flatpak = false )
private

Runs the given command and returns its output and return code.

Parameters
commandCommand to be run.
ignore_flatpakIf true: Do not modify the command for use inside of a flatpak sandbox.
Returns
Output, return code

◆ runConcurrent()

void MainWindow::runConcurrent ( QString command,
QString name,
QString type,
bool ignore_flatpak = false )
private

Runs the given command in a separate thread and prints its output to the log.

Parameters
commandCommand to be run.
nameName of the command.
typeType of command, e.g. 'Tool'.
ignore_flatpakIf true: Do not modify the command for use inside of a flatpak sandbox.

◆ setActiveBackup

void MainWindow::setActiveBackup ( int app_id,
int target_id,
int backup_id )
signal

Changes the currently active backup for the given target for the given ModdedApplication.

Parameters
app_idTarget app.
target_idTarget for which to change the active backup.
backup_idNew active backup.

◆ setBackupName

void MainWindow::setBackupName ( int app_id,
int target_id,
int backup_id,
QString name )
signal

Changes the name of the given backup for the given target for the given ModdedApplication.

Parameters
app_idTarget app.
target_idBackup target.
backup_idBackup to be edited.
nameThe new name.

◆ setBackupTargetName

void MainWindow::setBackupTargetName ( int app_id,
int target_id,
QString name )
signal

Changes the name of the given backup target for the given ModdedApplication.

Parameters
app_idTarget app.
target_idBackup target.
nameThe new name.

◆ setBusyStatus()

void MainWindow::setBusyStatus ( bool busy,
bool show_progress_bar = true,
bool disable_app_launch = false )
private

Sets the visibility status of the progress bar and disabled various UI elements while the ApplicationManager is busy.

Parameters
busyThe new status.
show_progress_barIf true: Show the progress bar if busy == true.
disable_app_launchIf true: Disable the run app action.

◆ setCmdArgument()

void MainWindow::setCmdArgument ( std::string argument)

Checks if the given argument is a NexusMods download link. If True: Downloads the mod.

Parameters
argumentPotential download link.

◆ setDebugMode()

void MainWindow::setDebugMode ( bool enabled)

Enables/ disables printing of debug log messages.

Parameters
enabledIf true: Print debug messages.

◆ setModStatus

void MainWindow::setModStatus ( int app_id,
int deployer,
int mod_id,
bool status )
signal

Enables or disables the given mod in the load order for given Deployer for given application.

Parameters
app_idThe target application.
deployerThe target Deployer
mod_idMod to be edited.
statusThe new status.

◆ setProfile

void MainWindow::setProfile ( int app_id,
int profile )
signal

Sets the currently active profile for given application.

Parameters
app_idThe target application.
profileThe new profile.

◆ setStatusMessage()

void MainWindow::setStatusMessage ( QString message,
int timeout_ms = 0 )
private

Sets a message for the status bar.

Parameters
messageNew status message.
timeoutLength in milliseconds for which the message will be shown. If == 0: Show message indefinitely.

◆ setTagsForMods

void MainWindow::setTagsForMods ( int app_id,
QStringList tag_names,
const std::vector< int > mod_ids )
signal

Sets the tags for all given mods to the given tags for the given ModdedApplication.

Parameters
app_idTarget app.
tag_namesNames of the new tags.
mod_idsTarget mod ids.

◆ showEditDeployerDialog()

void MainWindow::showEditDeployerDialog ( int deployer)
private

Initializes and shows a dialog used to edit the given deployer.

Parameters
deployerTarget deployer.

◆ sortModsByConflicts

void MainWindow::sortModsByConflicts ( int app_id,
int deployer )
signal

Sorts the load order by grouping mods which contain conflicting files.

Parameters
app_idTarget app.
deployerTarget deployer.

◆ suppressUpdateNotification

void MainWindow::suppressUpdateNotification ( int app_id,
const std::vector< int > & mod_ids )
signal

Temporarily disables update notifications for the given mods.

Parameters
app_idTarget app.
mod_idsIds of the mods for which update notifications are to be disabled.

◆ unDeployMods

void MainWindow::unDeployMods ( int app_id)
signal

Undeploys mods using all Deployer objects of one application.

Parameters
app_idThe target application.

◆ unDeployModsFor

void MainWindow::unDeployModsFor ( int app_id,
std::vector< int > deployer_ids )
signal

Undeploys mods using given Deployers of one application.

Parameters
app_idThe target application.
deployer_idsTarget Deployer ids.

◆ uninstallGroupMembers

void MainWindow::uninstallGroupMembers ( int app_id,
const std::vector< int > & mod_ids )
signal

Uninstalls all mods which are inactive group members of any group which contains any of the given mods for the given ModdedApplication.

Parameters
app_idTarget app.
mod_idsIds of the mods for which to uninstall group members.

◆ uninstallMods

void MainWindow::uninstallMods ( int app_id,
std::vector< int > mod_ids,
std::string installer_type )
signal

Uninstalls the given mods for one application, this includes deleting all installed files.

Parameters
app_idThe target application.
mod_idsIds of the mods to be uninstalled.
installer_typeThe Installer type used. If an empty string is given, the Installer used during installation is used.

◆ updateAutoTags

void MainWindow::updateAutoTags ( int app_id,
std::vector< int > mod_ids )
signal

Reapplies all auto tags to the given mods for the given ModdedApplication.

Parameters
app_idTarget app.
mod_idsIds of the mods to which auto tags are to be reapplied.

◆ updateDeployerList()

void MainWindow::updateDeployerList ( const DeployerInfo & depl_info)
private

Updates ui->mod_list with new data.

Parameters
depl_infoContains information about all mods belonging to all deployers.

◆ updateIgnoredFiles

void MainWindow::updateIgnoredFiles ( int app_id,
int deployer )
signal

Updates the file ignore list for ReverseDeployers.

Parameters
app_idTarget app.
deployerTarget deployer.

◆ updateModDeployers

void MainWindow::updateModDeployers ( int app_id,
std::vector< int > mod_ids,
std::vector< bool > deployers )
signal

Updates which deployer should manage given mods.

Parameters
app_idThe target application.
mod_idVector of mod ids to be added.
deployersBool for every deployer, indicating if the mods should be managed by that deployer.

◆ updateModList()

void MainWindow::updateModList ( const std::vector< ModInfo > & mod_info)
private

Updates ui->mod_list with new data.

Parameters
mod_infoContains information about all mods belonging to the current ModdedApplication.

◆ updateProgress

void MainWindow::updateProgress ( float progress)
privateslot

If progress bar is visible: Update it with the given progress.

Parameters
progressThe new progress.

◆ versionIsLessOrEqual()

bool MainWindow::versionIsLessOrEqual ( QString current_version,
QString target_version )
private

Compares two version strings by priority according to their position in the string. Version strings must contain only numbers and ".". Earlier numbers have higher priority, separated by "." chatacers. Example: 20.5.4 > 2.1.4.

Parameters
current_versionVersion for comparison.
target_versionCurrent version has to be <= this.
Returns
True if current_version <= target_version, else false. False if target_version is invalid, true if current_version is invalid.

The documentation for this class was generated from the following files: