game_list: Add "Remove" context menu

Adds the following actions:
- Remove Installed Update
- Remove All Installed DLC
- Remove Shader Cache
- Remove Custom Configuration
- Remove All Installed Contents
This commit is contained in:
Morph
2020-07-17 05:20:27 -04:00
parent b205b12e75
commit de6b852dc2
2 changed files with 37 additions and 4 deletions

View File

@ -39,6 +39,17 @@ enum class GameListOpenTarget {
ModData,
};
enum class GameListRemoveTarget {
ShaderCache,
CustomConfiguration,
};
enum class InstalledEntryType {
Game,
Update,
AddOnContent,
};
class GameList : public QWidget {
Q_OBJECT
@ -75,6 +86,8 @@ signals:
void ShouldCancelWorker();
void OpenFolderRequested(GameListOpenTarget target, const std::string& game_path);
void OpenTransferableShaderCacheRequested(u64 program_id);
void RemoveInstalledEntryRequested(u64 program_id, InstalledEntryType type);
void RemoveFileRequested(u64 program_id, GameListRemoveTarget target);
void DumpRomFSRequested(u64 program_id, const std::string& game_path);
void CopyTIDRequested(u64 program_id);
void NavigateToGamedbEntryRequested(u64 program_id,
@ -117,8 +130,6 @@ private:
friend class GameListSearchField;
};
Q_DECLARE_METATYPE(GameListOpenTarget);
class GameListPlaceholder : public QWidget {
Q_OBJECT
public: