2018-01-04 00:41:31 +00:00
|
|
|
// Copyright 2018 Dolphin Emulator Project
|
2021-07-05 01:22:19 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2018-01-04 00:41:31 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2021-07-04 10:53:53 +00:00
|
|
|
#include <array>
|
|
|
|
#include <string>
|
|
|
|
#include <string_view>
|
|
|
|
|
2018-01-04 00:41:31 +00:00
|
|
|
#include <QWidget>
|
|
|
|
|
2022-01-11 20:25:17 +00:00
|
|
|
#include "Common/EnumMap.h"
|
|
|
|
#include "Core/HW/EXI/EXI.h"
|
|
|
|
|
2018-01-04 00:41:31 +00:00
|
|
|
class QCheckBox;
|
|
|
|
class QComboBox;
|
2022-01-19 00:32:32 +00:00
|
|
|
class QHBoxLayout;
|
|
|
|
class QLabel;
|
2021-07-04 10:53:53 +00:00
|
|
|
class QLineEdit;
|
2018-01-04 00:41:31 +00:00
|
|
|
class QPushButton;
|
2022-01-19 00:32:32 +00:00
|
|
|
class QString;
|
2018-01-04 00:41:31 +00:00
|
|
|
|
|
|
|
class GameCubePane : public QWidget
|
|
|
|
{
|
2018-05-13 20:16:20 +00:00
|
|
|
Q_OBJECT
|
2018-01-04 00:41:31 +00:00
|
|
|
public:
|
|
|
|
explicit GameCubePane();
|
|
|
|
|
2021-07-04 10:53:53 +00:00
|
|
|
static std::string GetOpenGBARom(std::string_view title);
|
|
|
|
|
2018-01-04 00:41:31 +00:00
|
|
|
private:
|
|
|
|
void CreateWidgets();
|
|
|
|
void ConnectWidgets();
|
|
|
|
|
|
|
|
void LoadSettings();
|
|
|
|
void SaveSettings();
|
|
|
|
|
2021-07-04 10:53:53 +00:00
|
|
|
void OnEmulationStateChanged();
|
|
|
|
|
2022-01-11 20:25:17 +00:00
|
|
|
void UpdateButton(ExpansionInterface::Slot slot);
|
|
|
|
void OnConfigPressed(ExpansionInterface::Slot slot);
|
2018-01-04 00:41:31 +00:00
|
|
|
|
2022-01-11 20:25:17 +00:00
|
|
|
void BrowseMemcard(ExpansionInterface::Slot slot);
|
2022-01-19 00:32:32 +00:00
|
|
|
bool SetMemcard(ExpansionInterface::Slot slot, const QString& filename);
|
2022-01-19 02:05:05 +00:00
|
|
|
void BrowseGCIFolder(ExpansionInterface::Slot slot);
|
|
|
|
bool SetGCIFolder(ExpansionInterface::Slot slot, const QString& path);
|
2022-01-11 20:25:17 +00:00
|
|
|
void BrowseAGPRom(ExpansionInterface::Slot slot);
|
2022-01-19 00:32:32 +00:00
|
|
|
void SetAGPRom(ExpansionInterface::Slot slot, const QString& filename);
|
2021-07-04 10:53:53 +00:00
|
|
|
void BrowseGBABios();
|
|
|
|
void BrowseGBARom(size_t index);
|
|
|
|
void SaveRomPathChanged();
|
|
|
|
void BrowseGBASaves();
|
|
|
|
|
2018-01-04 00:41:31 +00:00
|
|
|
QCheckBox* m_skip_main_menu;
|
|
|
|
QComboBox* m_language_combo;
|
|
|
|
|
2022-01-11 20:25:17 +00:00
|
|
|
Common::EnumMap<QPushButton*, ExpansionInterface::MAX_SLOT> m_slot_buttons;
|
|
|
|
Common::EnumMap<QComboBox*, ExpansionInterface::MAX_SLOT> m_slot_combos;
|
2021-07-04 10:53:53 +00:00
|
|
|
|
2022-01-19 00:32:32 +00:00
|
|
|
Common::EnumMap<QHBoxLayout*, ExpansionInterface::MAX_MEMCARD_SLOT> m_memcard_path_layouts;
|
|
|
|
Common::EnumMap<QLabel*, ExpansionInterface::MAX_MEMCARD_SLOT> m_memcard_path_labels;
|
|
|
|
Common::EnumMap<QLineEdit*, ExpansionInterface::MAX_MEMCARD_SLOT> m_memcard_paths;
|
|
|
|
|
|
|
|
Common::EnumMap<QHBoxLayout*, ExpansionInterface::MAX_MEMCARD_SLOT> m_agp_path_layouts;
|
|
|
|
Common::EnumMap<QLabel*, ExpansionInterface::MAX_MEMCARD_SLOT> m_agp_path_labels;
|
|
|
|
Common::EnumMap<QLineEdit*, ExpansionInterface::MAX_MEMCARD_SLOT> m_agp_paths;
|
|
|
|
|
2022-01-19 02:05:05 +00:00
|
|
|
Common::EnumMap<QHBoxLayout*, ExpansionInterface::MAX_MEMCARD_SLOT> m_gci_path_layouts;
|
|
|
|
Common::EnumMap<QLabel*, ExpansionInterface::MAX_MEMCARD_SLOT> m_gci_path_labels;
|
|
|
|
Common::EnumMap<QLineEdit*, ExpansionInterface::MAX_MEMCARD_SLOT> m_gci_paths;
|
|
|
|
|
2021-07-04 10:53:53 +00:00
|
|
|
QCheckBox* m_gba_threads;
|
|
|
|
QCheckBox* m_gba_save_rom_path;
|
|
|
|
QPushButton* m_gba_browse_bios;
|
|
|
|
QLineEdit* m_gba_bios_edit;
|
|
|
|
std::array<QPushButton*, 4> m_gba_browse_roms;
|
|
|
|
std::array<QLineEdit*, 4> m_gba_rom_edits;
|
|
|
|
QPushButton* m_gba_browse_saves;
|
|
|
|
QLineEdit* m_gba_saves_edit;
|
2018-01-04 00:41:31 +00:00
|
|
|
};
|