2015-12-19 22:24:48 -07:00
|
|
|
// Copyright 2015 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2+
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2018-01-24 07:25:35 -07:00
|
|
|
#include <array>
|
2017-12-31 12:33:36 -07:00
|
|
|
#include <memory>
|
2017-06-14 03:58:11 -06:00
|
|
|
#include <string>
|
|
|
|
|
2015-12-19 22:24:48 -07:00
|
|
|
#include <QMenu>
|
|
|
|
#include <QMenuBar>
|
|
|
|
|
2017-09-04 12:12:13 -06:00
|
|
|
namespace Core
|
|
|
|
{
|
|
|
|
enum class State;
|
|
|
|
}
|
|
|
|
|
2017-08-24 09:38:31 -06:00
|
|
|
namespace DiscIO
|
|
|
|
{
|
|
|
|
enum class Region;
|
|
|
|
};
|
|
|
|
|
2017-12-31 12:33:36 -07:00
|
|
|
namespace UICommon
|
|
|
|
{
|
|
|
|
class GameFile;
|
|
|
|
}
|
|
|
|
|
2015-12-19 22:24:48 -07:00
|
|
|
class MenuBar final : public QMenuBar
|
|
|
|
{
|
2016-06-24 02:43:46 -06:00
|
|
|
Q_OBJECT
|
2015-12-19 22:24:48 -07:00
|
|
|
|
|
|
|
public:
|
2016-06-24 02:43:46 -06:00
|
|
|
explicit MenuBar(QWidget* parent = nullptr);
|
2015-12-19 22:24:48 -07:00
|
|
|
|
2017-06-30 03:24:26 -06:00
|
|
|
void UpdateStateSlotMenu();
|
|
|
|
void UpdateToolsMenu(bool emulation_started);
|
|
|
|
|
2015-12-19 22:24:48 -07:00
|
|
|
signals:
|
2016-06-24 02:43:46 -06:00
|
|
|
// File
|
|
|
|
void Open();
|
|
|
|
void Exit();
|
2018-03-22 18:18:53 -06:00
|
|
|
void ChangeDisc();
|
|
|
|
void BootDVDBackup(const QString& backup);
|
|
|
|
void EjectDisc();
|
2015-12-19 22:24:48 -07:00
|
|
|
|
2016-06-24 02:43:46 -06:00
|
|
|
// Emulation
|
|
|
|
void Play();
|
|
|
|
void Pause();
|
|
|
|
void Stop();
|
|
|
|
void Reset();
|
|
|
|
void Fullscreen();
|
|
|
|
void FrameAdvance();
|
|
|
|
void Screenshot();
|
2017-07-20 09:52:45 -06:00
|
|
|
void StartNetPlay();
|
2016-06-24 02:43:46 -06:00
|
|
|
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);
|
2017-07-06 03:00:37 -06:00
|
|
|
void BootWiiSystemMenu();
|
2017-08-24 09:38:31 -06:00
|
|
|
void ImportNANDBackup();
|
2016-02-14 18:56:40 -07:00
|
|
|
|
2017-06-14 03:58:11 -06:00
|
|
|
void PerformOnlineUpdate(const std::string& region);
|
|
|
|
|
2017-08-24 08:35:47 -06:00
|
|
|
// Tools
|
2018-01-25 11:54:50 -07:00
|
|
|
void ShowMemcardManager();
|
2017-08-24 08:35:47 -06:00
|
|
|
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-01-24 07:25:35 -07:00
|
|
|
void ConnectWiiRemote(int id);
|
2017-08-24 08:35:47 -06:00
|
|
|
|
2017-06-06 05:49:49 -06:00
|
|
|
// Options
|
2017-07-16 15:11:11 -06:00
|
|
|
void Configure();
|
|
|
|
void ConfigureGraphics();
|
|
|
|
void ConfigureAudio();
|
|
|
|
void ConfigureControllers();
|
2017-06-06 05:49:49 -06:00
|
|
|
void ConfigureHotkeys();
|
|
|
|
|
2016-06-24 02:43:46 -06:00
|
|
|
// View
|
|
|
|
void ShowList();
|
2017-08-05 02:28:53 -06:00
|
|
|
void ShowGrid();
|
2018-03-21 04:13:53 -06:00
|
|
|
void ToggleSearch();
|
2017-05-08 11:03:59 -06:00
|
|
|
void ColumnVisibilityToggled(const QString& row, bool visible);
|
2017-07-11 08:13:09 -06:00
|
|
|
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
|
|
|
|
2017-12-31 12:33:36 -07: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);
|
|
|
|
|
2015-12-19 22:24:48 -07:00
|
|
|
private:
|
2017-09-04 12:12:13 -06:00
|
|
|
void OnEmulationStateChanged(Core::State state);
|
|
|
|
|
2016-06-24 02:43:46 -06:00
|
|
|
void AddFileMenu();
|
2018-03-22 18:18:53 -06:00
|
|
|
void AddDVDBackupMenu(QMenu* file_menu);
|
2015-12-19 22:24:48 -07:00
|
|
|
|
2016-06-24 02:43:46 -06:00
|
|
|
void AddEmulationMenu();
|
|
|
|
void AddStateLoadMenu(QMenu* emu_menu);
|
|
|
|
void AddStateSaveMenu(QMenu* emu_menu);
|
|
|
|
void AddStateSlotMenu(QMenu* emu_menu);
|
2016-02-14 18:56:40 -07:00
|
|
|
|
2016-06-24 02:43:46 -06:00
|
|
|
void AddViewMenu();
|
|
|
|
void AddGameListTypeSection(QMenu* view_menu);
|
2017-08-05 02:28:53 -06:00
|
|
|
void AddListColumnsMenu(QMenu* view_menu);
|
2017-07-11 08:13:09 -06:00
|
|
|
void AddShowPlatformsMenu(QMenu* view_menu);
|
|
|
|
void AddShowRegionsMenu(QMenu* view_menu);
|
2016-02-14 18:56:40 -07:00
|
|
|
|
2017-06-06 05:49:49 -06:00
|
|
|
void AddOptionsMenu();
|
2017-05-04 15:01:12 -06:00
|
|
|
void AddToolsMenu();
|
2016-06-24 02:43:46 -06:00
|
|
|
void AddHelpMenu();
|
2017-08-27 05:55:05 -06:00
|
|
|
void AddMovieMenu();
|
2018-02-14 15:25:01 -07:00
|
|
|
void AddSymbolsMenu();
|
2016-02-14 18:56:40 -07:00
|
|
|
|
2017-08-24 09:38:31 -06:00
|
|
|
void InstallWAD();
|
|
|
|
void ImportWiiSave();
|
|
|
|
void ExportWiiSaves();
|
2017-10-03 08:45:59 -06:00
|
|
|
void CheckNAND();
|
2017-08-26 06:41:53 -06:00
|
|
|
void NANDExtractCertificates();
|
2018-02-14 15:25:01 -07:00
|
|
|
void ChangeDebugFont();
|
|
|
|
|
|
|
|
// Debugging UI
|
|
|
|
void ClearSymbols();
|
|
|
|
void GenerateSymbolsFromAddress();
|
|
|
|
void GenerateSymbolsFromSignatureDB();
|
|
|
|
void GenerateSymbolsFromRSO();
|
|
|
|
void LoadSymbolMap();
|
|
|
|
void LoadOtherSymbolMap();
|
|
|
|
void SaveSymbolMap();
|
|
|
|
void SaveSymbolMapAs();
|
|
|
|
void SaveCode();
|
|
|
|
void CreateSignatureFile();
|
|
|
|
void PatchHLEFunctions();
|
2017-08-24 09:38:31 -06:00
|
|
|
|
2017-12-31 12:33:36 -07:00
|
|
|
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);
|
2017-09-13 11:33:45 -06:00
|
|
|
void OnDebugModeToggled(bool enabled);
|
2017-08-27 05:55:05 -06:00
|
|
|
|
2016-06-24 02:43:46 -06:00
|
|
|
// File
|
|
|
|
QAction* m_open_action;
|
|
|
|
QAction* m_exit_action;
|
2018-03-22 18:18:53 -06:00
|
|
|
QAction* m_change_disc;
|
|
|
|
QAction* m_eject_disc;
|
|
|
|
QMenu* m_backup_menu;
|
2016-02-14 18:56:40 -07:00
|
|
|
|
2017-05-04 15:01:12 -06:00
|
|
|
// Tools
|
2018-03-25 20:17:47 -06:00
|
|
|
QAction* m_show_cheat_manager;
|
2017-05-04 15:01:12 -06:00
|
|
|
QAction* m_wad_install_action;
|
2017-06-14 03:58:11 -06:00
|
|
|
QMenu* m_perform_online_update_menu;
|
|
|
|
QAction* m_perform_online_update_for_current_region;
|
2017-08-24 08:35:47 -06:00
|
|
|
QAction* m_ntscj_ipl;
|
|
|
|
QAction* m_ntscu_ipl;
|
|
|
|
QAction* m_pal_ipl;
|
2017-08-24 09:38:31 -06:00
|
|
|
QAction* m_import_backup;
|
2017-10-03 08:45:59 -06:00
|
|
|
QAction* m_check_nand;
|
2017-08-26 06:41:53 -06:00
|
|
|
QAction* m_extract_certificates;
|
2018-01-24 07:25:35 -07:00
|
|
|
std::array<QAction*, 5> m_wii_remotes;
|
2017-05-04 15:01:12 -06:00
|
|
|
|
2016-06-24 02:43:46 -06:00
|
|
|
// 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;
|
2017-07-06 03:00:37 -06:00
|
|
|
QAction* m_boot_sysmenu;
|
2016-06-24 02:43:46 -06:00
|
|
|
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;
|
2017-09-13 11:33:45 -06:00
|
|
|
|
2018-02-14 15:25:01 -07:00
|
|
|
// Options
|
|
|
|
QAction* m_boot_to_pause;
|
|
|
|
QAction* m_automatic_start;
|
|
|
|
QAction* m_change_font;
|
|
|
|
|
2017-09-13 11:33:45 -06:00
|
|
|
// View
|
2018-02-14 15:25:01 -07:00
|
|
|
QAction* m_show_code;
|
2017-09-13 11:33:45 -06:00
|
|
|
QAction* m_show_registers;
|
2017-09-27 00:53:05 -06:00
|
|
|
QAction* m_show_watch;
|
2017-10-03 10:43:44 -06:00
|
|
|
QAction* m_show_breakpoints;
|
2018-03-16 05:39:53 -06:00
|
|
|
QAction* m_show_memory;
|
2018-02-14 15:25:01 -07:00
|
|
|
|
|
|
|
// Symbols
|
|
|
|
QMenu* m_symbols;
|
2015-12-19 22:24:48 -07:00
|
|
|
};
|