dolphin/Source/Core/DolphinQt/MenuBar.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

291 lines
6.9 KiB
C
Raw Normal View History

2015-12-19 22:24:48 -07:00
// Copyright 2015 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
2015-12-19 22:24:48 -07:00
#pragma once
#include <array>
#include <memory>
#include <string>
#include <vector>
2015-12-19 22:24:48 -07:00
#include <QMenuBar>
#include <QPointer>
2015-12-19 22:24:48 -07:00
#include "Common/CommonTypes.h"
2019-02-25 12:59:49 -07:00
class QMenu;
class ParallelProgressDialog;
2019-02-25 12:59:49 -07:00
namespace Core
{
enum class State;
}
namespace DiscIO
{
enum class Region;
};
namespace UICommon
{
class GameFile;
}
using RSOPairEntry = std::pair<u32, std::string>;
using RSOVector = std::vector<RSOPairEntry>;
2015-12-19 22:24:48 -07:00
class MenuBar final : public QMenuBar
{
Q_OBJECT
public:
static MenuBar* GetMenuBar() { return s_menu_bar; }
explicit MenuBar(QWidget* parent = nullptr);
2015-12-19 22:24:48 -07:00
void UpdateToolsMenu(bool emulation_started);
QMenu* GetListColumnsMenu() const { return m_cols_menu; }
void InstallUpdateManually();
2015-12-19 22:24:48 -07:00
signals:
// File
2015-12-19 22:24:48 -07:00
void Open();
void Exit();
void ChangeDisc();
void EjectDisc();
void OpenUserFolder();
2015-12-19 22:24:48 -07:00
// Emulation
void Play();
void Pause();
void Stop();
void Reset();
void Fullscreen();
void FrameAdvance();
void Screenshot();
void StartNetPlay();
2019-03-30 07:50:57 -06:00
void BrowseNetPlay();
void StateLoad();
void StateSave();
void StateLoadSlot();
void StateSaveSlot();
void StateLoadSlotAt(int slot);
void StateSaveSlotAt(int slot);
void StateLoadUndo();
void StateSaveUndo();
void StateSaveOldest();
void SetStateSlot(int slot);
void BootWiiSystemMenu();
void ImportNANDBackup();
void PerformOnlineUpdate(const std::string& region);
// Tools
2018-01-25 11:54:50 -07:00
void ShowMemcardManager();
void BootGameCubeIPL(DiscIO::Region region);
2017-08-30 08:44:28 -06:00
void ShowFIFOPlayer();
void ShowAboutDialog();
2018-03-25 20:17:47 -06:00
void ShowCheatsManager();
2018-11-17 08:36:28 -07:00
void ShowResourcePackManager();
void ShowSkylanderPortal();
void ShowInfinityBase();
void ConnectWiiRemote(int id);
#ifdef USE_RETRO_ACHIEVEMENTS
void ShowAchievementsWindow();
#endif // USE_RETRO_ACHIEVEMENTS
// Options
void Configure();
void ConfigureGraphics();
void ConfigureAudio();
void ConfigureControllers();
void ConfigureHotkeys();
void ConfigureFreelook();
// View
2015-12-19 22:24:48 -07:00
void ShowList();
void ShowGrid();
void PurgeGameListCache();
void ShowSearch();
2017-05-08 11:03:59 -06:00
void ColumnVisibilityToggled(const QString& row, bool visible);
void GameListPlatformVisibilityToggled(const QString& row, bool visible);
void GameListRegionVisibilityToggled(const QString& row, bool visible);
2015-12-19 22:24:48 -07:00
2017-08-27 05:55:05 -06:00
// Movie
void PlayRecording();
void StartRecording();
void StopRecording();
void ExportRecording();
2018-01-27 06:35:02 -07:00
void ShowTASInput();
2017-08-27 05:55:05 -06:00
void SelectionChanged(std::shared_ptr<const UICommon::GameFile> game_file);
2017-08-27 05:55:05 -06:00
void RecordingStatusChanged(bool recording);
void ReadOnlyModeChanged(bool read_only);
// Synbols
void NotifySymbolsUpdated();
2015-12-19 22:24:48 -07:00
private:
void OnEmulationStateChanged(Core::State state);
2015-12-19 22:24:48 -07:00
void AddFileMenu();
void AddEmulationMenu();
void AddStateLoadMenu(QMenu* emu_menu);
void AddStateSaveMenu(QMenu* emu_menu);
void AddStateSlotMenu(QMenu* emu_menu);
void AddViewMenu();
2015-12-19 22:24:48 -07:00
void AddGameListTypeSection(QMenu* view_menu);
void AddListColumnsMenu(QMenu* view_menu);
void AddShowPlatformsMenu(QMenu* view_menu);
void AddShowRegionsMenu(QMenu* view_menu);
void AddOptionsMenu();
void AddToolsMenu();
void AddHelpMenu();
2017-08-27 05:55:05 -06:00
void AddMovieMenu();
2018-04-09 07:31:20 -06:00
void AddJITMenu();
2018-02-14 15:25:01 -07:00
void AddSymbolsMenu();
void UpdateStateSlotMenu();
void InstallWAD();
void ImportWiiSave();
void ExportWiiSaves();
void CheckNAND();
void NANDExtractCertificates();
2018-02-14 15:25:01 -07:00
void ChangeDebugFont();
// Debugging UI
void ClearSymbols();
void GenerateSymbolsFromAddress();
void GenerateSymbolsFromSignatureDB();
void GenerateSymbolsFromRSO();
void GenerateSymbolsFromRSOAuto();
RSOVector DetectRSOModules(ParallelProgressDialog& progress);
2018-02-14 15:25:01 -07:00
void LoadSymbolMap();
void LoadOtherSymbolMap();
void LoadBadSymbolMap();
2018-02-14 15:25:01 -07:00
void SaveSymbolMap();
void SaveSymbolMapAs();
void SaveCode();
bool TryLoadMapFile(const QString& path, const bool bad = false);
void TrySaveSymbolMap(const QString& path);
2018-02-14 15:25:01 -07:00
void CreateSignatureFile();
void AppendSignatureFile();
void ApplySignatureFile();
void CombineSignatureFiles();
2018-02-14 15:25:01 -07:00
void PatchHLEFunctions();
2018-04-09 07:31:20 -06:00
void ClearCache();
void LogInstructions();
void SearchInstruction();
void OnSelectionChanged(std::shared_ptr<const UICommon::GameFile> game_file);
2017-08-27 05:55:05 -06:00
void OnRecordingStatusChanged(bool recording);
void OnReadOnlyModeChanged(bool read_only);
void OnDebugModeToggled(bool enabled);
2017-08-27 05:55:05 -06:00
2019-10-12 10:04:51 -06:00
QString GetSignatureSelector() const;
static QPointer<MenuBar> s_menu_bar;
// File
QAction* m_open_action;
QAction* m_exit_action;
QAction* m_change_disc;
QAction* m_eject_disc;
QMenu* m_backup_menu;
QAction* m_open_user_folder;
// Tools
QAction* m_wad_install_action;
QMenu* m_perform_online_update_menu;
QAction* m_perform_online_update_for_current_region;
QAction* m_ntscj_ipl;
QAction* m_ntscu_ipl;
QAction* m_pal_ipl;
2019-05-18 16:24:25 -06:00
QMenu* m_manage_nand_menu;
QAction* m_import_backup;
QAction* m_check_nand;
QAction* m_extract_certificates;
std::array<QAction*, 5> m_wii_remotes;
QAction* m_import_wii_save;
QAction* m_export_wii_saves;
// Emulation
QAction* m_play_action;
QAction* m_pause_action;
QAction* m_stop_action;
QAction* m_reset_action;
QAction* m_fullscreen_action;
QAction* m_frame_advance_action;
QAction* m_screenshot_action;
QAction* m_boot_sysmenu;
QMenu* m_state_load_menu;
QMenu* m_state_save_menu;
QMenu* m_state_slot_menu;
QActionGroup* m_state_slots;
QMenu* m_state_load_slots_menu;
QMenu* m_state_save_slots_menu;
2017-08-27 05:55:05 -06:00
// Movie
QAction* m_recording_export;
QAction* m_recording_play;
QAction* m_recording_start;
QAction* m_recording_stop;
QAction* m_recording_read_only;
2018-02-14 15:25:01 -07:00
// Options
QAction* m_boot_to_pause;
QAction* m_automatic_start;
QAction* m_reset_ignore_panic_handler;
2018-02-14 15:25:01 -07:00
QAction* m_change_font;
QAction* m_controllers_action;
2018-02-14 15:25:01 -07:00
// View
2018-02-14 15:25:01 -07:00
QAction* m_show_code;
QAction* m_show_registers;
QAction* m_show_threads;
2017-09-27 00:53:05 -06:00
QAction* m_show_watch;
QAction* m_show_breakpoints;
2018-03-16 05:39:53 -06:00
QAction* m_show_memory;
QAction* m_show_network;
2018-04-09 07:31:20 -06:00
QAction* m_show_jit;
2022-12-18 01:43:28 -07:00
QAction* m_show_assembler;
QMenu* m_cols_menu;
2018-04-09 07:31:20 -06:00
// JIT
QMenu* m_jit;
2018-02-14 15:25:01 -07:00
// Symbols
QMenu* m_symbols;
2018-04-09 07:31:20 -06:00
QAction* m_jit_interpreter_core;
QAction* m_jit_block_linking;
QAction* m_jit_disable_cache;
QAction* m_jit_disable_fastmem;
QAction* m_jit_disable_fastmem_arena;
QAction* m_jit_disable_large_entry_points_map;
2018-04-09 07:31:20 -06:00
QAction* m_jit_clear_cache;
QAction* m_jit_log_coverage;
QAction* m_jit_search_instruction;
QAction* m_jit_off;
QAction* m_jit_loadstore_off;
QAction* m_jit_loadstore_lbzx_off;
QAction* m_jit_loadstore_lxz_off;
QAction* m_jit_loadstore_lwz_off;
QAction* m_jit_loadstore_floating_off;
QAction* m_jit_loadstore_paired_off;
QAction* m_jit_floatingpoint_off;
QAction* m_jit_integer_off;
QAction* m_jit_paired_off;
QAction* m_jit_systemregisters_off;
QAction* m_jit_branch_off;
QAction* m_jit_register_cache_off;
bool m_game_selected = false;
2015-12-19 22:24:48 -07:00
};