2018-01-03 17:41:31 -07:00
|
|
|
// Copyright 2018 Dolphin Emulator Project
|
2021-07-04 19:22:19 -06:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2018-01-03 17:41:31 -07:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2021-07-04 04:53:53 -06:00
|
|
|
#include <array>
|
|
|
|
#include <string>
|
|
|
|
#include <string_view>
|
|
|
|
|
2018-01-03 17:41:31 -07:00
|
|
|
#include <QWidget>
|
|
|
|
|
2022-01-11 13:25:17 -07:00
|
|
|
#include "Common/EnumMap.h"
|
|
|
|
#include "Core/HW/EXI/EXI.h"
|
|
|
|
|
2018-01-03 17:41:31 -07:00
|
|
|
class QCheckBox;
|
|
|
|
class QComboBox;
|
2022-01-18 17:32:32 -07:00
|
|
|
class QHBoxLayout;
|
|
|
|
class QLabel;
|
2021-07-04 04:53:53 -06:00
|
|
|
class QLineEdit;
|
2018-01-03 17:41:31 -07:00
|
|
|
class QPushButton;
|
2022-01-18 17:32:32 -07:00
|
|
|
class QString;
|
2022-11-06 21:59:39 -07:00
|
|
|
class QVBoxLayout;
|
2018-01-03 17:41:31 -07:00
|
|
|
|
|
|
|
class GameCubePane : public QWidget
|
|
|
|
{
|
2018-05-13 14:16:20 -06:00
|
|
|
Q_OBJECT
|
2018-01-03 17:41:31 -07:00
|
|
|
public:
|
|
|
|
explicit GameCubePane();
|
|
|
|
|
2021-07-04 04:53:53 -06:00
|
|
|
static std::string GetOpenGBARom(std::string_view title);
|
|
|
|
|
2018-01-03 17:41:31 -07:00
|
|
|
private:
|
|
|
|
void CreateWidgets();
|
|
|
|
void ConnectWidgets();
|
|
|
|
|
|
|
|
void LoadSettings();
|
|
|
|
void SaveSettings();
|
|
|
|
|
2021-07-04 04:53:53 -06:00
|
|
|
void OnEmulationStateChanged();
|
|
|
|
|
2022-01-11 13:25:17 -07:00
|
|
|
void UpdateButton(ExpansionInterface::Slot slot);
|
|
|
|
void OnConfigPressed(ExpansionInterface::Slot slot);
|
2018-01-03 17:41:31 -07:00
|
|
|
|
2022-01-11 13:25:17 -07:00
|
|
|
void BrowseMemcard(ExpansionInterface::Slot slot);
|
2022-01-18 17:32:32 -07:00
|
|
|
bool SetMemcard(ExpansionInterface::Slot slot, const QString& filename);
|
2022-01-18 19:05:05 -07:00
|
|
|
void BrowseGCIFolder(ExpansionInterface::Slot slot);
|
|
|
|
bool SetGCIFolder(ExpansionInterface::Slot slot, const QString& path);
|
2022-01-11 13:25:17 -07:00
|
|
|
void BrowseAGPRom(ExpansionInterface::Slot slot);
|
2022-01-18 17:32:32 -07:00
|
|
|
void SetAGPRom(ExpansionInterface::Slot slot, const QString& filename);
|
2021-07-04 04:53:53 -06:00
|
|
|
void BrowseGBABios();
|
|
|
|
void BrowseGBARom(size_t index);
|
|
|
|
void SaveRomPathChanged();
|
|
|
|
void BrowseGBASaves();
|
|
|
|
|
2018-01-03 17:41:31 -07:00
|
|
|
QCheckBox* m_skip_main_menu;
|
|
|
|
QComboBox* m_language_combo;
|
|
|
|
|
2022-01-11 13:25:17 -07:00
|
|
|
Common::EnumMap<QPushButton*, ExpansionInterface::MAX_SLOT> m_slot_buttons;
|
|
|
|
Common::EnumMap<QComboBox*, ExpansionInterface::MAX_SLOT> m_slot_combos;
|
2021-07-04 04:53:53 -06:00
|
|
|
|
2022-01-18 17:32:32 -07: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-11-06 21:59:39 -07:00
|
|
|
Common::EnumMap<QVBoxLayout*, ExpansionInterface::MAX_MEMCARD_SLOT> m_gci_path_layouts;
|
2022-01-18 19:05:05 -07:00
|
|
|
Common::EnumMap<QLabel*, ExpansionInterface::MAX_MEMCARD_SLOT> m_gci_path_labels;
|
2022-11-06 21:59:39 -07:00
|
|
|
Common::EnumMap<QLabel*, ExpansionInterface::MAX_MEMCARD_SLOT> m_gci_override_labels;
|
2022-01-18 19:05:05 -07:00
|
|
|
Common::EnumMap<QLineEdit*, ExpansionInterface::MAX_MEMCARD_SLOT> m_gci_paths;
|
|
|
|
|
2021-07-04 04:53:53 -06: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-03 17:41:31 -07:00
|
|
|
};
|