30#include "overwritebackupdialog.h"
43#include <QDragEnterEvent>
44#include <QDragLeaveEvent>
48#include <QPlainTextEdit>
49#include <QProgressBar>
50#include <QTableWidget>
285 std::map<std::string, std::pair<std::string, std::vector<TagCondition>>>
auto_tags_;
378 void setBusyStatus(
bool busy,
bool show_progress_bar =
true,
bool disable_app_launch =
false);
401 QPair<QString, int>
runCommand(QString command,
bool ignore_flatpak =
false);
409 void runConcurrent(QString command, QString name, QString type,
bool ignore_flatpak =
false);
644 QString extracted_path,
645 QString local_source,
646 QString remote_source,
667 QString default_backup,
668 QString first_backup);
685 void onBackupAdded(
int app_id,
int target, QString name, QString target_name,
int source);
965 void onModSourcesEdited(
int app_id,
int mod_id, QString local_source, QString remote_source);
1072 std::vector<int> deployers,
1073 QStringList auto_tags);
1163 void uninstallMods(
int app_id, std::vector<int> mod_ids, std::string installer_type);
1402 QString remote_source,
1422 QString default_backup,
1423 QString first_backup);
1440 void addBackup(
int app_id,
int target_id, QString name,
int source);
1504 void setTagsForMods(
int app_id, QStringList tag_names,
const std::vector<int> mod_ids);
1511 void addTagsToMods(
int app_id, QStringList tag_names,
const std::vector<int>& mod_ids);
1544 void editModSources(
int app_id,
int mod_id, QString local_source, QString remote_source);
Header for the AddAppDialog class.
Header for the AddBackupDialog class.
Header for the AddBackupTargetDialog class.
Header for the AddDeployerDialog class.
Header for the AddModDialog class.
Header for the AddProfileDialog class.
Header for the AddToDeployerDialog class.
Header for the AddToGroupDialog class.
Header for the ApplicationManager class.
Header for the BackupListModel class.
Header for the BackupNameDelegate class.
Header for the ChangelogDialog class.
Contains several ModdedApplication objects and provides access to their functions using Qt's signal/ ...
Definition applicationmanager.h:34
Manages and provides access to the data displayed in the backup list.
Definition backuplistmodel.h:16
Provides a line edit to change backup target names.
Definition backupnamedelegate.h:16
Manages and provides access to the data displayed in the file conflicts window.
Definition conflictsmodel.h:16
Manages and provides access to the data displayed in the deployer list.
Definition deployerlistmodel.h:17
Used to sort and filter the deployer list.
Definition deployerlistproxymodel.h:17
void on_actionget_file_conflicts_triggered()
Generates file conflicts for currently selected mod.
Definition mainwindow.cpp:2410
std::vector< TagCheckBox * > depl_tag_cbs_
Pointers to all checkboxes used to filter the deployer list by tags.
Definition mainwindow.h:273
int move_button_row_
Stores the row containing the currently held down move button for load orders.
Definition mainwindow.h:132
bool ask_remove_tool_
If true: Show confirmation box before removing a tool.
Definition mainwindow.h:182
void onModInstallationComplete(bool success)
Proceeds with the next mod import, if the queue is not empty.
Definition mainwindow.cpp:3335
void on_filter_active_mods_depl_cb_stateChanged(int state)
Adds/ removes the mods in groups filter to the deployer list proxy.
Definition mainwindow.cpp:3020
void onGetBackupInfo(std::vector< BackupTarget > backups)
Updates the backups tab with new data.
Definition mainwindow.cpp:2090
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 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 onBackupNameEdited(int target, int backup, QString name)
Called when the name of a backup was edited by the user.
Definition mainwindow.cpp:2731
void closeEvent(QCloseEvent *event) override
Store the GUI state in a QSettings file before closing the window.
Definition mainwindow.cpp:105
void setupButtons()
Initializes all buttons belonging to this window.
Definition mainwindow.cpp:751
bool ask_remove_mod_
If true: Show confirmation box before removing a mod.
Definition mainwindow.h:174
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 ...
Definition mainwindow.cpp:3221
void setProfile(int app_id, int profile)
Sets the currently active profile for given application.
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.
Definition mainwindow.h:278
bool received_progress_
Tracks whether a progress signals has been received since the last busy action started.
Definition mainwindow.h:302
void scrollLists()
Used to synchronize scrolling in lists with the event queue.
void removeBackup(int app_id, int target_id, int backup_id)
Deletes the given backup for given target for given ModdedApplication.
void resizeDeployerListColumns()
Resizes the deployer list columns to fit the current contents.
Definition mainwindow.cpp:2163
void sortModsByConflicts(int app_id, int deployer)
Sorts the load order by grouping mods which contain conflicting files.
QAction * add_profile_action_
Action used to add a new profile.
Definition mainwindow.h:164
int currentApp()
Returns the currently active ModdedApplication.
Definition mainwindow.cpp:723
bool debug_mode_
If true: Print debug messages.
Definition mainwindow.h:304
void onBackupTargetAdded(int app_id, QString name, QString path, QString default_backup, QString first_backup)
Called when the AddBackupTargetDialog has been completed.
Definition mainwindow.cpp:2100
void reapplyAutoTags(int app_id)
Reapplies all auto tags for all mods for the given ModdedApplication.
void onRemoveDeployerButtonClicked()
Deletes the currently active Deployer.
Definition mainwindow.cpp:2281
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.
Definition mainwindow.cpp:3302
void getProfileNames(int app_id, bool is_new)
Creates a vector containing the names of all profiles of one application.
void importMod()
Extracts or downloads the next mod in mod_import_targets_.
Definition mainwindow.cpp:853
bool show_log_on_warning_
If true: Show the log window when a warning is logged.
Definition mainwindow.h:294
static constexpr int deployer_tab_idx
Index of the app tab.
Definition mainwindow.h:120
void on_app_tab_widget_currentChanged(int index)
Disabled or enables some actions based on the current tab.
Definition mainwindow.cpp:2804
int getColumnIndex(QTableWidget *table, QString col_name)
Returns the index of the given column name for the given QTableWidget.
Definition mainwindow.cpp:924
void onAddModDialogAccept(int app_id, AddModInfo info)
Installs a new mod.
Definition mainwindow.cpp:1383
bool initNexusApiKey()
Initializes the NexusMods API key from the values stored in the settings file.
Definition mainwindow.cpp:1215
std::vector< ListAction * > deployer_mod_actions_
Contains additional mod actions to be added to the deployer list context menu for the current deploye...
Definition mainwindow.h:317
void on_deployer_selection_box_currentIndexChanged(int index)
Updates the currently active Deployer.
Definition mainwindow.cpp:2272
std::chrono::time_point< std::chrono::high_resolution_clock > last_progress_update_time_
Timestamp representing the last time the progress bar has been updated.
Definition mainwindow.h:298
void onAddDeployerDialogComplete(EditDeployerInfo info, int app_id)
Adds a new Deployer.
Definition mainwindow.cpp:1497
void on_app_selection_box_currentIndexChanged(int index)
Updates the currently active ModdedApplication.
Definition mainwindow.cpp:2253
void onExportAppConfigDialogComplete(int app_id, std::vector< int > deployers, QStringList auto_tags)
Emits exportAppConfiguration.
Definition mainwindow.cpp:3423
void on_profile_selection_box_currentIndexChanged(int index)
Updates the currently active profile.
Definition mainwindow.cpp:2513
void updateModDeployers(int app_id, std::vector< int > mod_ids, std::vector< bool > deployers)
Updates which deployer should manage given mods.
void setBackupTargetName(int app_id, int target_id, QString name)
Changes the name of the given backup target 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.
bool is_a_flatpak_
Indicates if Limo is running as a flatpak.
Definition mainwindow.h:306
void checkForModUpdates(int app_id)
Checks for available mod updates on NexusMods.
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 addApplication(EditApplicationInfo info)
Adds a new application.
void onRemoveAppButtonClicked()
Deletes the currently active ModdedApplication.
Definition mainwindow.cpp:2319
void on_undeploy_button_clicked()
Checks for external changes and reverts mod deployment.
Definition mainwindow.cpp:3431
void updateModList(const std::vector< ModInfo > &mod_info)
Updates ui->mod_list with new data.
Definition mainwindow.cpp:709
void setStatusMessage(QString message, int timeout_ms=0)
Sets a message for the status bar.
Definition mainwindow.cpp:934
void onGetModInfo(std::vector< ModInfo > mod_info)
Calls updateModList with new data.
Definition mainwindow.cpp:1398
QString previous_app_version_
APP_VERSION the last time the app was run.
Definition mainwindow.h:319
void enableModifyApps(bool enabled)
Enables/ Disables actions which allow for the removal, adding or editing of applications.
Definition mainwindow.cpp:1159
void applyModAction(int app_id, int deployer, int action, int mod_id)
Applies the given mod action to the given mod.
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 on_filter_active_mods_cb_stateChanged(int state)
Adds/ removes the inactive mods filter to the mod list proxy.
Definition mainwindow.cpp:2994
void onBackupTargetRemoveClicked(int target, QString name)
Called when a remove backup target button has been clicked.
Definition mainwindow.cpp:2737
BackupNameDelegate * backup_target_name_delegate_
Used to edit the name of backup targets.
Definition mainwindow.h:250
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 ...
void onModVersionEdited(int mod_id, QString version)
Notifies app_manager_ of version change.
Definition mainwindow.cpp:2669
void onModNameChanged(int mod_id, QString name)
Notifies app_manager_ to change the name of the given mod.
Definition mainwindow.cpp:2684
void on_actionbrowse_mod_files_triggered()
Opens the file explorer at the staging directory of the selected mod.
Definition mainwindow.cpp:2614
void on_update_auto_tags_button_clicked()
Reapplies all auto tags.
Definition mainwindow.cpp:3124
void updateDeployerList(const DeployerInfo &depl_info)
Updates ui->mod_list with new data.
Definition mainwindow.cpp:715
void onModAdded(QList< QUrl > paths)
Called when files are dragged into the application. Stores paths to all files and begins installation...
Definition mainwindow.cpp:1366
std::unique_ptr< AddModDialog > add_mod_dialog_
Reusable dialog for adding new mods.
Definition mainwindow.h:188
void onModActionTriggered(int action)
Emits applyModAction for the given action.
Definition mainwindow.cpp:3510
void on_actionRemove_from_Group_triggered()
Removes the currently selected mod from its group.
Definition mainwindow.cpp:2601
void on_actionOverwrite_Backup_triggered()
Opens a OverWriteBackupDialog.
Definition mainwindow.cpp:2826
QProgressBar * progress_bar_
Progress bar shown in the status bar.
Definition mainwindow.h:264
QMenu * deployer_list_menu_
Context menu for ui->deployer_list.
Definition mainwindow.h:146
QMenu * backup_list_menu_
Context menu for ui->backup_list.
Definition mainwindow.h:148
void setupIpcServer()
Initializes the QLocalServer used for communications with other Limo instances.
Definition mainwindow.cpp:1257
std::unique_ptr< AddToolDialog > add_tool_dialog_
Reusable dialog for adding new tools.
Definition mainwindow.h:194
void getAppInfo(int app_id)
Creates AppInfo for given application.
void onReceiveLogMessage(Log::LogLevel log_level, QString message)
Shows the received message in the log.
Definition mainwindow.cpp:2664
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.
std::unique_ptr< AddProfileDialog > add_profile_dialog_
Reusable dialog for adding new profiles.
Definition mainwindow.h:190
void setupMenus()
Initializes context menus.
Definition mainwindow.cpp:510
std::unique_ptr< AddToDeployerDialog > add_to_deployer_dialog_
Reusable dialog for adding a mod to a Deployer.
Definition mainwindow.h:192
VersionBoxDelegate * version_deledate_
Used to edit mod versions in the mod list.
Definition mainwindow.h:238
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.
Ui::MainWindow * ui
Contains auto-generated ui elements.
Definition mainwindow.h:114
QAction * add_deployer_action_
Action used to add a new deployer.
Definition mainwindow.h:158
static constexpr int backup_tab_idx
Index of the app tab.
Definition mainwindow.h:122
void deployMods(int app_id)
Deploys mods using all Deployer objects of one application.
std::unique_ptr< AddToGroupDialog > add_to_group_dialog_
Reusable dialog for adding a mod to a group.
Definition mainwindow.h:198
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 Tagcondit...
Definition mainwindow.h:285
void onEditToolButtonPressed(int row, int col)
Edits the tool to which this button belongs.
Definition mainwindow.cpp:3471
void initChangelog()
Initializes the changelogdialog. Show the dialog if current version > version on last start.
Definition mainwindow.cpp:154
std::unique_ptr< SettingsDialog > settings_dialog_
Reusable settings dialog.
Definition mainwindow.h:200
void onDownloadFailed()
Cancels installation of the pending mod.
Definition mainwindow.cpp:3239
void onBackupTargetNameEdited(int target, QString name)
Called when the name of a backup target was edited by the user.
Definition mainwindow.cpp:2759
void onModManualTagFilterChanged(QString tag, int state)
Updates the mod_list filter with the new state for the given tag.
Definition mainwindow.cpp:3087
void on_search_field_textEdited(const QString &text)
Applies the search field text as a filter to ui->mod_list and ui->deployer_list.
Definition mainwindow.cpp:2458
void removeDeployer(int app_id, int deployer, bool cleanup)
Removes a Deployer from an application.
std::unique_ptr< NexusModDialog > nexus_mod_dialog_
Reusable dialog for displaying NexusMods data for a mod.
Definition mainwindow.h:216
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.
Definition mainwindow.cpp:2136
void onActiveGroupMemberChanged(int group, int mod_id)
Notifies app_manager_ of active group member change.
Definition mainwindow.cpp:2675
bool move_button_pressed_
True if the button used to reorder load orders is being pressed.
Definition mainwindow.h:130
QMenu * mod_list_menu_
Context menu for ui->mod_list.
Definition mainwindow.h:144
void onAutoTagsEdited(int app_id, std::vector< EditAutoTagAction > actions)
Called by the edit_auto_tags_dialog_ when editing is completed.
Definition mainwindow.cpp:3116
void onCompletedOperations(QString message="")
Hides the progress bar and shows the given status message.
Definition mainwindow.cpp:1696
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 setDebugMode(bool enabled)
Enables/ disables printing of debug log messages.
Definition mainwindow.cpp:146
std::unique_ptr< ChangelogDialog > changelog_dialog_
Reusable dialog for showing changelogs.
Definition mainwindow.h:222
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...
QThread * worker_thread_
Thread containing the ApplicationManager.
Definition mainwindow.h:136
void on_edit_app_button_clicked()
Shows a dialog to edit the currently active ModdedApplication.
Definition mainwindow.cpp:2446
std::vector< QString > deployer_target_paths_
For every current deployer: The target path it uses.
Definition mainwindow.h:310
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 onSettingsDialogComplete()
Called when the settings dialog has completed. Updates state with new settings.
Definition mainwindow.cpp:2075
std::unique_ptr< QMessageBox > message_box_
Used to show info or error messages.
Definition mainwindow.h:196
int currentProfile()
Returns the currently active profile.
Definition mainwindow.cpp:733
void on_actionEdit_Tags_for_mods_triggered()
Opens the manage_manual_tags_dialog_ for all currently selected mods.
Definition mainwindow.cpp:3069
void on_actionUpdate_Tags_triggered()
Reapplies tags to the currently selected mods.
Definition mainwindow.cpp:3132
void removeApplication(int app_id, bool cleanup)
Removes an application and optionally deletes all installed mods and the settings file in the applica...
void onToolAdded(int app_id, Tool tool)
Adds a new tool with the given data.
Definition mainwindow.cpp:3497
void removeModFromDeployer(int app_id, int deployer, int mod_id)
Removes a mod from the load order for given Deployer for given 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...
void on_settings_button_clicked()
Shows the settings dialog.
Definition mainwindow.cpp:2712
std::unique_ptr< ManageModTagsDialog > manage_mod_tags_dialog_
Reusable dialog for managing the manual tags assigned to a set of mods.
Definition mainwindow.h:210
void changeModName(int app_id, int mod_id, QString new_name)
Setter for a mod name.
void getModInfo(int app_id)
Creates a vector containing information about all installed mods, stored in ModInfo objects for one a...
void on_filters_button_clicked()
Toggles visibility of the filters widget.
Definition mainwindow.cpp:2981
void showEditDeployerDialog(int deployer)
Initializes and shows a dialog used to edit the given deployer.
Definition mainwindow.cpp:830
void onLaunchToolButtonPressed(int row, int col)
Launches the tool to which this button belongs.
Definition mainwindow.cpp:3459
QAction * remove_app_action_
Action used to remove the current application.
Definition mainwindow.h:154
void onRemoveProfileButtonClicked()
Removes the currently active profile.
Definition mainwindow.cpp:2545
void downloadMod(int app_id, QString nxm_url)
Downloads a mod from nexusmods using the given nxm_url.
void unDeployMods(int app_id)
Undeploys mods using all Deployer objects of one application.
void onToolEdited(int app_id, int tool_id, Tool tool)
Replaces the given tool with the given new tool.
Definition mainwindow.cpp:3504
std::vector< Tool > tools_
Contains all tools managed by the current app.
Definition mainwindow.h:312
void onEditDeployerMenuClicked()
Shows a dialog to edit the currently active Deployer.
Definition mainwindow.cpp:2508
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...
Definition mainwindow.cpp:3344
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 getDeployerNames(int app_id, bool is_new)
Updates Entries in the Deployer combo box.
void getNexusPage(int app_id, int mod_id)
Fetches data for the given mod from NexusMods.
void on_actionSort_Mods_triggered()
Sorts and colors mods by conflicts groups.
Definition mainwindow.cpp:2650
void on_check_mod_updates_button_clicked()
Checks for updates for all mods for the current application.
Definition mainwindow.cpp:3281
void onAddProfileDialogFinished(int return_code)
Enables actions for modifying profiles and apps.
Definition mainwindow.cpp:2976
void removeModFromGroup(int app_id, int mod_id)
Removes a mod from it's group for one application.
bool show_log_on_error_
If true: Show the log window when an error is logged.
Definition mainwindow.h:292
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 Application...
Definition mainwindow.cpp:902
std::unique_ptr< AddAppDialog > add_app_dialog_
Reusable dialog for adding new applications.
Definition mainwindow.h:184
void onAddAppDialogFinished(int return_code)
Enables actions for modifying apps.
Definition mainwindow.cpp:2955
int deployer_list_slider_pos_
Last position of the scroll bar for ui->deployer_list.
Definition mainwindow.h:228
ModListModel * mod_list_model_
Model used by the mod list.
Definition mainwindow.h:236
void onDeployerBoxChange(int mod_id, bool status)
Called when a mod gets disabled/ enabled in ui->deployer_list. Updates the mods state.
Definition mainwindow.cpp:1392
void on_actionSuppress_Update_triggered()
Temporarily disables the update notification for all selected mods.
Definition mainwindow.cpp:3325
void updateProgress(float progress)
If progress bar is visible: Update it with the given progress.
Definition mainwindow.cpp:2854
void onModRemoved(int mod_id, QString name)
Notifies app_manager_ to remove the mod in the currently selected mod.
Definition mainwindow.cpp:2690
void onModMovedTo(int from, int to)
Called when a mod has been moved to a different position using the MoveModDialog.
Definition mainwindow.cpp:1991
void on_actionAdd_to_Ignore_List_triggered()
Adds the currently selected mod in the deployer list to the ignore list of the current ReverseDeploye...
Definition mainwindow.cpp:3450
void onExternalChangesDialogAborted()
Called when the ExternalChangesDialog has been aborted. Cancels deployment.
Definition mainwindow.cpp:3403
static const QString deploy_mode_hard_link
Display string for hard link deployment.
Definition mainwindow.h:124
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 onModMoved(int from, int to)
Moves a mod in the current load order.
Definition mainwindow.cpp:1861
void onAddToDeployerAccept(std::vector< int > &mod_ids, std::vector< bool > deployers)
Updates which deployers should manage given mods.
Definition mainwindow.cpp:1684
void on_actionSelect_All_triggered()
Selects all mods in the mods_tab.
Definition mainwindow.cpp:3291
void onLogButtonPressed()
Toggles log window visibility.
Definition mainwindow.cpp:2659
TableCellDelegate * mod_list_cell_delegate_
Delegate used to draw cells in ui->mod_list.
Definition mainwindow.h:252
std::unique_ptr< IpcServer > ipc_server_
QLocalServer wrapper used for communication with other instances of Limo.
Definition mainwindow.h:296
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....
void on_actionAdd_Backup_triggered()
Adds a new backup to the currently selected target.
Definition mainwindow.cpp:2765
void getApplicationNames(bool is_new)
Updates Entries in the application combo box.
void onAddBackupTargetDialogFinished(int return_code)
Enables actions for modifying backups and apps.
Definition mainwindow.cpp:2966
QAction * edit_profile_action_
Action used to edit the current profile.
Definition mainwindow.h:168
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.
Definition mainwindow.cpp:1997
void onBackupOverwritten(int target_id, int source_backup, int dest_backup)
Emits overwriteBackup.
Definition mainwindow.cpp:2836
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 editProfile(int app_id, int profile, EditProfileInfo info)
Used to set the name of a profile for one application.
bool ask_remove_backup_
If true: Show confirmation box before removing a backup.
Definition mainwindow.h:180
static const QString deploy_mode_sym_link
Display string for sym link deployment.
Definition mainwindow.h:126
void onDeployerListContextMenu(QPoint pos)
Called on right clicking in ui->deployer_list. Shows a context menu at the given position.
Definition mainwindow.cpp:1653
QAction * edit_app_action_
Action used to edit the current application.
Definition mainwindow.h:156
bool ignore_table_changes_
If true: changes to ui->mod_list will not trigger table updates.
Definition mainwindow.h:138
std::vector< QString > deployer_source_paths_
For every current deployer: The source path it uses.
Definition mainwindow.h:308
void onExternalChangesDialogCompleted(int app_id, int deployer, const FileChangeChoices &changes_to_keep, bool deploy)
Called when the ExternalChangesDialog has been completed sucessfully. Emits keepOrRevertFileModificat...
Definition mainwindow.cpp:3394
void addModToIgnoreList(int app_id, int deployer, int mod_id)
Adds the given mod to the ignore list of the given ReverseDeployer.
void removeBackupTarget(int app_id, int target_id)
Removes the given backup target from the given ModdedApplication by deleting all relevant backups and...
void onEditProfileButtonClicked()
Shows a dialog to edit the currently active profile.
Definition mainwindow.cpp:2535
void enableModifyDeployers(bool enabled)
Enables/ Disables actions which allow for the removal, adding or editing of deployers and apps.
Definition mainwindow.cpp:1176
static const QString deploy_mode_copy
Display string for copy deployment.
Definition mainwindow.h:128
void enableModifyProfiles(bool enabled)
Enables/ Disables actions which allow for the removal, adding or editing of profiles and applications...
Definition mainwindow.cpp:1207
void on_actionEdit_Mod_Sources_triggered()
Shows the EditModSourcesDialog for the currently selected mod.
Definition mainwindow.cpp:3140
std::vector< TagCheckBox * > manual_tag_cbs_
Pointers to all checkboxes used to filter the mod list by manual tags.
Definition mainwindow.h:271
QPair< QString, int > runCommand(QString command, bool ignore_flatpak=false)
Runs the given command and returns its output and return code.
Definition mainwindow.cpp:1003
void installMod(int app_id, AddModInfo info)
Installs a new mod for one application using the given Installer type.
void suppressUpdateNotification(int app_id, const std::vector< int > &mod_ids)
Temporarily disables update notifications for the given mods.
void onBusyDialogAborted()
Called when a dialog, which requires the busy status to be set, was aborted. Sets busy status to fals...
Definition mainwindow.cpp:2971
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 ModdedAppl...
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 pr...
Definition mainwindow.cpp:1904
void onScrollLists()
Used to synchronize scrolling in lists with the event queue. Scrolls deployer and mod list to their c...
Definition mainwindow.cpp:2846
std::vector< TagCheckBox * > auto_tag_cbs_
Pointers to all checkboxes used to filter the mod list by auto tags.
Definition mainwindow.h:280
void deployModsFor(int app_id, std::vector< int > deployer_ids)
Deploys mods using given Deployers of one application.
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 ...
void setupProgressBar()
Initializes the progress bar and adds it to the status bar.
Definition mainwindow.cpp:2170
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 onGetDeployerNames(QStringList names, bool is_new)
Updates the Deployer combo box with new deployer names.
Definition mainwindow.cpp:1556
std::priority_queue< ImportModInfo > mod_import_queue_
Contains all queued mods to be downloaded or extracted.
Definition mainwindow.h:226
void setupConnections()
Creates signal/ slot connections between this and the ApplicationManager.
Definition mainwindow.cpp:166
LogFrame
Describes target widgets for logging.
Definition mainwindow.h:73
@ LOG_TOOLS
Logging widget for tools.
Definition mainwindow.h:77
@ LOG_MAIN
Main logging widget.
Definition mainwindow.h:75
MainWindow(QWidget *parent=nullptr)
Constructor. Initializes the UI elements and restores their state from a file. Creates an Application...
Definition mainwindow.cpp:67
void loadSettings()
Loads all stored settings from the settings file and updates the respective values.
Definition mainwindow.cpp:1046
void onGetProfileNames(QStringList names, bool is_new)
Updates the profile combo box with new profile names.
Definition mainwindow.cpp:1870
void setupFilters()
Initializes ui elements used to filter lists.
Definition mainwindow.cpp:2189
void setupDialogs()
Initializes all reusable dialogs.
Definition mainwindow.cpp:561
void getDeployerInfo(int app_id, int deployer)
Creates DeployerInfo for one Deployer for one application.
int mod_list_slider_pos_
Last position of the scroll bar for ui->mod_list.
Definition mainwindow.h:230
void onManualModTagsUpdated(int app_id, QStringList tags, std::vector< int > mod_ids, int mode)
Updates the manual tags for all given mods.
Definition mainwindow.cpp:3054
void updateOutdatedSettings()
Checks the current settings for outdated entries and adepts those as needed.
Definition mainwindow.cpp:1301
QAction * edit_deployer_action_
Action used to edit the current deployer.
Definition mainwindow.h:162
QTableView * conflicts_list_
Used to display file conflicts.
Definition mainwindow.h:262
DeployerListModel * deployer_model_
Model used by the deployer list.
Definition mainwindow.h:234
void initUiWithoutApps(bool has_apps)
Disables/ enables UI elements in case no applications exist.
Definition mainwindow.cpp:1264
void addTool(int app_id, Tool tool)
Adds a new tool to given application.
std::unique_ptr< ExportAppConfigDialog > export_app_config_dialog_
Reusable dialog for exporting the configuration of the current app.
Definition mainwindow.h:220
bool ignore_tool_changes_
If true: changes to ui->info_tool_list will not trigger table updates.
Definition mainwindow.h:170
void editApplication(EditApplicationInfo info, int app_id)
Edits an application and optionally moves all of it's mods to a new directory.
void removeProfile(int app_id, int profile)
Removes a profile from an application.
void on_actionShow_Nexus_Page_triggered()
Shows data from NexusMods for the currently selected mod.
Definition mainwindow.cpp:3164
void onDeployerEdited(EditDeployerInfo info, int app_id, int deployer)
Updates type, name and target directory for one deployer of one application.
Definition mainwindow.cpp:1847
void onAddModAborted(QString temp_dir)
Called when "cancel" button is pressed during mod installation. Clears all pending mod installations.
Definition mainwindow.cpp:1942
void enableModifyBackups(bool enabled)
Enables/ Disables actions which allow for the removal, adding or editing of backups and backup target...
Definition mainwindow.cpp:1197
void onProfileEdited(int app_id, int profile, EditProfileInfo info)
Changes the name of the given profile.
Definition mainwindow.cpp:1912
void onAddBackupTargetClicked()
Called when the add backup target button has been clicked.
Definition mainwindow.cpp:2718
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 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 ModdedApplic...
void on_reset_filter_button_clicked()
Resets filters such that lists show all mods.
Definition mainwindow.cpp:2487
void resizeModListColumns()
Resizes the mod list columns to fit the current contents.
Definition mainwindow.cpp:2151
QAction * run_app_action_
Action used to run the current application.
Definition mainwindow.h:150
TableCellDelegate * backup_list_cell_delegate_
Delegate used to draw cells in ui->backup_list.
Definition mainwindow.h:256
void onBackupListContextMenu(QPoint pos)
Called on right clicking in ui->backup_list. Shows a context menu at the given position.
Definition mainwindow.cpp:2113
void onLaunchAppButtonClicked()
Launches the current application.
Definition mainwindow.cpp:2434
void on_actionRemove_Mods_triggered()
Removes all selected mods.
Definition mainwindow.cpp:2897
void onUpdateIgnoredFiles(int app_id, int deployer)
Updates the file ignore list for ReverseDeployers.
Definition mainwindow.cpp:3441
static constexpr int app_tab_idx
Index of the app tab.
Definition mainwindow.h:116
TableCellDelegate * deployer_list_cell_delegate_
Delegate used to draw cells in ui->deployer_list.
Definition mainwindow.h:254
bool versionIsLessOrEqual(QString current_version, QString target_version)
Compares two version strings by priority according to their position in the string....
Definition mainwindow.cpp:1347
void onGetApplicationNames(QStringList names, QStringList icon_paths, bool is_new)
Updates the application combo box with new ModdedApplication names.
Definition mainwindow.cpp:1507
void onGetAppInfo(AppInfo app_info)
Updates the "App" tab.
Definition mainwindow.cpp:1720
std::unique_ptr< AddDeployerDialog > add_deployer_dialog_
Reusable dialog for adding new deployers.
Definition mainwindow.h:186
void getBackupInfo(int app_id)
Requests info about backups for one ModdedApplication.
QString search_term_
Matched against mod names to filter the mod- and deployer lists.
Definition mainwindow.h:142
void filterModList()
Applies current search filter to ui->mod_list.
Definition mainwindow.cpp:738
void onAddAppDialogComplete(EditApplicationInfo info)
Adds a new application.
Definition mainwindow.cpp:1488
void onModListContextMenu(QPoint pos)
Called on right clicking in ui->mod_list. Shows a context menu at the given position.
Definition mainwindow.cpp:1592
void onDeplTagFilterChanged(QString tag, int state)
Updates the deployer_list filter with the new state for the given tag.
Definition mainwindow.cpp:3098
void onManualTagsEdited(int app_id, std::vector< EditManualTagAction > actions)
Called by the edit_manual_tags_dialog_ when editing is completed.
Definition mainwindow.cpp:3047
void on_filter_group_mods_cb_stateChanged(int state)
Adds/ removes the mods in groups filter to the mod list proxy.
Definition mainwindow.cpp:3007
void on_actionbrowse_deployer_files_triggered()
Opens the file explorer at the target directory of the selected deployer.
Definition mainwindow.cpp:2635
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 activ...
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 ...
bool is_initialized_
Indicates whether ui->deployer_list has been initialized.
Definition mainwindow.h:140
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 modif...
void on_edit_manual_tags_button_clicked()
Opens the EditManualTagsDialog window.
Definition mainwindow.cpp:3033
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 on_edit_auto_tags_button_clicked()
Opens the EditAutoTagsDialog.
Definition mainwindow.cpp:3109
void onApplicationEdited(EditApplicationInfo info, int app_id)
Updates an application and optionally moves all of it's mods to a new directory.
Definition mainwindow.cpp:1841
std::unique_ptr< AddBackupTargetDialog > add_backup_target_dialog_
Reusable dialog for adding new backup targets.
Definition mainwindow.h:202
void addModToGroup(int app_id, int mod_id, int group)
Adds a mod to an existing group of an application.
void on_actionadd_to_deployer_triggered()
Shows a dialog to add the currently selected mod to a Deployer.
Definition mainwindow.cpp:2355
void onModSourcesEdited(int app_id, int mod_id, QString local_source, QString remote_source)
Updates local and remote mod sources for the given mod.
Definition mainwindow.cpp:3153
void checkForContainers()
Checks the environmet for signs that Limo is running in a container, like flatpak.
Definition mainwindow.cpp:1293
void removeTool(int app_id, int tool_id)
Removes a tool from given application.
DeployerListProxyModel * deployer_list_proxy_
Proxy model for the deployer list.
Definition mainwindow.h:244
void setupLists()
Initializes ui->mod_list and ui->deployer_list and creates connections.
Definition mainwindow.cpp:418
void setupIcons()
Initializes some ui icons.
Definition mainwindow.cpp:2212
void unDeployModsFor(int app_id, std::vector< int > deployer_ids)
Undeploys mods using given Deployers of one application.
void onAddDeployerButtonClicked()
Shows a dialog to add a new Deployer.
Definition mainwindow.cpp:2262
void on_actionget_mod_conflicts_triggered()
Filters mods such that only those in conflict with the currently selected mod are visible .
Definition mainwindow.cpp:2474
void onAddToolClicked()
Shows a dialog to add a new tool.
Definition mainwindow.cpp:2428
std::unique_ptr< EditModSourcesDialog > edit_mod_sources_dialog_
Reusable dialog for editing local and remote mod source paths.
Definition mainwindow.h:214
void filterDeployerList()
Applies current search and conflicts filters to ui->deployer_list.
Definition mainwindow.cpp:744
const QString temp_dir_
Temporary directory used for file extractions.
Definition mainwindow.h:232
void onGetDeployerInfo(DeployerInfo depl_info)
Calls updateDeployerList with new data.
Definition mainwindow.cpp:1414
QAction * add_app_action_
Action used to add a new application.
Definition mainwindow.h:152
void on_actionRemove_Other_Versions_triggered()
Removes all group members of the currently selected mod, except for the active one.
Definition mainwindow.cpp:2922
void on_actionAdd_to_Group_triggered()
Adds a dialog to add the currently selected mod to a group.
Definition mainwindow.cpp:2576
std::unique_ptr< EditAutoTagsDialog > edit_auto_tags_dialog_
Reusable dialog for editing auto tags.
Definition mainwindow.h:212
void onGetFileConflicts(std::vector< ConflictInfo > conflicts)
Shows a ConflictsWidget window containing given file conflict information.
Definition mainwindow.cpp:1704
void onGetNexusPage(int app_id, int mod_id, nexus::Page page)
Shows a NexusModDialog with data from the given page.
Definition mainwindow.cpp:3176
void on_actionremove_from_deployer_triggered()
Removes the currently selected mod from the current Deployer.
Definition mainwindow.cpp:2376
std::vector< bool > getAutonomousDeployers()
Returns a vector of bools indicating for each deployer if that deployer is autonomous.
Definition mainwindow.cpp:1146
void onAddProfileButtonClicked()
Shows a dialog to add a new profile.
Definition mainwindow.cpp:2525
void addDeployer(int app_id, EditDeployerInfo info)
Adds a new Deployer of given type to given application.
std::unique_ptr< EditManualTagsDialog > edit_manual_tags_dialog_
Reusable dialog for editing manual tags.
Definition mainwindow.h:208
BackupListModel * backup_list_model_
Model used by the backup list.
Definition mainwindow.h:246
void onAddDeployerDialogFinished(int return_code)
Enables actions for modifying deployers and apps.
Definition mainwindow.cpp:2961
void onReceiveError(QString title, QString message)
Shows a message box displaying an error.
Definition mainwindow.cpp:2569
VersionBoxDelegate * backup_delegate_
Used to edit the active backup in the backup list.
Definition mainwindow.h:248
void checkModsForUpdates(int app_id, const std::vector< int > &mod_ids)
Checks for available updates for the given mod for the given app.
int last_mod_list_index_
Stores the index in ui->mod_list of a mod before being added to a group.
Definition mainwindow.h:224
ApplicationManager * app_manager_
Handles installation and deployment of all mods. Runs in a separate thread.
Definition mainwindow.h:134
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.
Definition mainwindow.h:269
void editDeployer(EditDeployerInfo info, int app_id, int deployer)
Used to set type, name and target directory for one deployer of one application.
float last_progress_
The last progress state.
Definition mainwindow.h:300
void onExternalChangesHandled(int app_id, int deployer, int num_deployers, bool deploy)
Gets external changes for other deployers. If there are none: Begin deployment.
Definition mainwindow.cpp:3359
void on_actionBrowse_backup_files_triggered()
Opens the default file manager at the location of the selected backup.
Definition mainwindow.cpp:2812
int currentDeployer()
Returns the currently active Deployer.
Definition mainwindow.cpp:728
~MainWindow()
Destructor. Stops the worker thread and performs cleanup.
Definition mainwindow.cpp:94
void on_actionReinstall_From_Local_triggered()
Reinstalls the currently selected mod from the local source.
Definition mainwindow.cpp:3247
QWidget * conflicts_window_
Holds conflicts_list_.
Definition mainwindow.h:260
void onAddAppButtonClicked()
Shows a dialog to add a new ModdedApplication.
Definition mainwindow.cpp:2245
ModListProxyModel * mod_list_proxy_
Proxy model for the mod list.
Definition mainwindow.h:242
void on_deploy_button_clicked()
Deploys all mods for the currently active ModdedApplication.
Definition mainwindow.cpp:2234
void on_export_app_config_button_clicked()
Opens the export_app_config_dialog_.
Definition mainwindow.cpp:3409
ModNameDelegate * mod_name_delegate_
Used to edit mod names in the mod list.
Definition mainwindow.h:240
void onActiveBackupChanged(int target, int backup)
Called when the index of a backup combo box changes. Updates the active backup.
Definition mainwindow.cpp:2725
bool ask_remove_profile_
If true: Show confirmation box before removing a profile.
Definition mainwindow.h:176
void updateIgnoredFiles(int app_id, int deployer)
Updates the file ignore list for ReverseDeployers.
void changeActiveGroupMember(int app_id, int group, int mod_id)
Changes the active member of given group of an application to given mod.
QAction * remove_profile_action_
Action used to remove a profile.
Definition mainwindow.h:166
bool ask_remove_backup_target_
If true: Show confirmation box before removing a backup target.
Definition mainwindow.h:178
std::unique_ptr< ExternalChangesDialog > external_changes_dialog_
Reusable dialog for displaying external changes to files.
Definition mainwindow.h:218
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.
Definition mainwindow.cpp:1025
void onModAddedToGroup(int mod_id, int target_id)
Adds the given mod to the given group.
Definition mainwindow.cpp:1929
void setupLog()
Initializes the log frame and button.
Definition mainwindow.cpp:939
std::unique_ptr< AddBackupDialog > add_backup_dialog_
Reusable dialog for adding new backups to existing targets.
Definition mainwindow.h:204
ConflictsModel * conflicts_model_
Model used to hold data for file conflicts.
Definition mainwindow.h:258
void on_actionmove_mod_triggered()
Shows a dialog to move the currently selected mod to a new position in the load order.
Definition mainwindow.cpp:2495
QAction * remove_deployer_action_
Action used to remove the current deployer.
Definition mainwindow.h:160
void on_actionRemove_Backup_triggered()
Removes the currently active backup from the currently selected target.
Definition mainwindow.cpp:2776
void setCmdArgument(std::string argument)
Checks if the given argument is a NexusMods download link. If True: Downloads the mod.
Definition mainwindow.cpp:127
void on_actionCheck_For_Updates_triggered()
Checks for available updates for the selected mods.
Definition mainwindow.cpp:3315
void onDownloadComplete(int app_id, int mod_id, QString file_path, QString mod_url)
Begins extraction of downloaded mod.
Definition mainwindow.cpp:3205
void onProfileRemoved()
Deletes the currently active profile.
Definition mainwindow.cpp:1919
void onGetModConflicts(std::unordered_set< int > conflicts)
Filters ui->mod_list so that it only show conflicting mods.
Definition mainwindow.cpp:1854
bool ask_remove_from_deployer_
If true: Show confirmation box before removing a Deployer.
Definition mainwindow.h:172
static constexpr int mods_tab_idx
Index of the app tab.
Definition mainwindow.h:118
void onEditDeployerPressed()
Shows a dialog to edit the currently active Deployer.
Definition mainwindow.cpp:2423
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 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 mod...
bool deploy_for_all_
If true: Deploy button starts deployment for all deployers, else: Only for the currently active one.
Definition mainwindow.h:290
void onRemoveToolButtonPressed(int row, int col)
Deletes the tool to which this button belongs.
Definition mainwindow.cpp:3477
void onReceiveIpcMessage(QString message)
Called by the IPC server when a message from another Limo instance was received. If the message conta...
Definition mainwindow.cpp:3182
void setTabWidgetStyleSheet()
Generates and sets the style sheet for ui->app_tab_widget.
Definition mainwindow.cpp:1131
std::unique_ptr< OverwriteBackupDialog > overwrite_backup_dialog_
Reusable dialog for overwriting backups.
Definition mainwindow.h:206
Manages and provides access to the data displayed in the mod list.
Definition modlistmodel.h:18
Used to sort or filter the mod list.
Definition modlistproxymodel.h:16
Provides a line edit to change mod names.
Definition modnamedelegate.h:19
Paints a cell containing text or an icon in a ModListView.
Definition tablecelldelegate.h:17
Provides either a QLineEdit or a QComboBox to edit a mods version.
Definition versionboxdelegate.h:18
Header for the ConflictsModel class.
Header for the DeployerListModel class.
Header for the DeployerListProxyModel class.
Header for the EditModSourcesDialog class.
Header for the ExportAppConfigDialog class.
Header for the ExternalChangesDialog class.
Contains the ImportModInfo struct.
Header for the IpcServer class.
Header for the ListAction class.
char path[256]
Path to which to extract the file.
Definition lspakfilelistentry.h:1
Header for the ModListModel class.
Header for the ModListProxyModel class.
Header for the ModNameDelegate class.
LogLevel
Represents the importance of a log message.
Definition log.h:19
Header for the NexusModDialog class.
Header for the SettingsDialog class.
Stores data needed to install a new mod.
Definition addmodinfo.h:17
Stores information about a ModdedApplication.
Definition appinfo.h:20
Stores a deployer's installed mods and load order.
Definition deployerinfo.h:17
Stores data needed to either create a new or edit an existing application.
Definition editapplicationinfo.h:19
Stores data needed to either create a new or edit an existing deployer.
Definition editdeployerinfo.h:17
Stores data needed to either create a new or edit an existing profile of a application.
Definition editprofileinfo.h:16
Contains data regarding externally modified files for one deployer.
Definition externalchangesinfo.h:18
Contains data regarding which external file changes to keep.
Definition filechangechoices.h:16
Contains all data for a mod available through the NexusMods api.
Definition api.h:23
Header for the TableCellDelegate class.
Header for the TagCheckBox class.
Header for the VersionBoxDelegate class.