Debian Codegraph @

Source/Core/DolphinQt/Settings/GameCubePane.h

raw symbols SCIP
1 // Copyright 2018 Dolphin Emulator Project
2 // SPDX-License-Identifier: GPL-2.0-or-later
3
4 #pragma once
5
6 #include <array>
7 #include <string>
8 #include <string_view>
9
10 #include <QWidget>
11
12 #include "Common/EnumMap.h"
13 #include "Core/HW/EXI/EXI.h"
14 #include "DolphinQt/MainWindow.h"
15
16 class ConfigBool;
17 class ConfigChoice;
18 class ConfigText;
19 class ConfigUserPath;
20 class QComboBox;
21 class QHBoxLayout;
22 class QLabel;
23 class QLineEdit;
24 class QPushButton;
25 class QString;
26 class QVBoxLayout;
27
28 class GameCubePane : public QWidget
29 {
30 Q_OBJECT
31 public:
32 explicit GameCubePane(MainWindow* main_window);
33
34 static std::string GetOpenGBARom(std::string_view title);
35
36 signals:
37 void ShowTriforceWindow();
38
39 private:
40 void CreateWidgets();
41 void ConnectWidgets();
42
43 void LoadSettings();
44 void SaveSettings();
45
46 void OnEmulationStateChanged();
47
48 void UpdateButton(ExpansionInterface::Slot slot);
49 void OnConfigPressed(ExpansionInterface::Slot slot);
50
51 void BrowseMemcard(ExpansionInterface::Slot slot);
52 bool SetMemcard(ExpansionInterface::Slot slot, const QString& filename);
53 void BrowseGCIFolder(ExpansionInterface::Slot slot);
54 bool SetGCIFolder(ExpansionInterface::Slot slot, const QString& path);
55 void BrowseAGPRom(ExpansionInterface::Slot slot);
56 void SetAGPRom(ExpansionInterface::Slot slot, const QString& filename);
57
58 #ifdef HAS_LIBMGBA
59 void BrowseGBABios();
60 void BrowseGBARom(size_t index);
61 void SaveRomPathChanged();
62 void BrowseGBASaves();
63 #endif // HAS_LIBMGBA
64
65 ConfigBool* m_skip_main_menu;
66 ConfigChoice* m_language_combo;
67
68 Common::EnumMap<QPushButton*, ExpansionInterface::Slot::SP1> m_slot_buttons;
69 Common::EnumMap<QComboBox*, ExpansionInterface::Slot::SP1> m_slot_combos;
70
71 Common::EnumMap<QHBoxLayout*, ExpansionInterface::MAX_MEMCARD_SLOT> m_memcard_path_layouts;
72 Common::EnumMap<QLabel*, ExpansionInterface::MAX_MEMCARD_SLOT> m_memcard_path_labels;
73 Common::EnumMap<QLineEdit*, ExpansionInterface::MAX_MEMCARD_SLOT> m_memcard_paths;
74
75 Common::EnumMap<QHBoxLayout*, ExpansionInterface::MAX_MEMCARD_SLOT> m_agp_path_layouts;
76 Common::EnumMap<QLabel*, ExpansionInterface::MAX_MEMCARD_SLOT> m_agp_path_labels;
77 Common::EnumMap<QLineEdit*, ExpansionInterface::MAX_MEMCARD_SLOT> m_agp_paths;
78
79 Common::EnumMap<QVBoxLayout*, ExpansionInterface::MAX_MEMCARD_SLOT> m_gci_path_layouts;
80 Common::EnumMap<QLabel*, ExpansionInterface::MAX_MEMCARD_SLOT> m_gci_path_labels;
81 Common::EnumMap<QLabel*, ExpansionInterface::MAX_MEMCARD_SLOT> m_gci_override_labels;
82 Common::EnumMap<QLineEdit*, ExpansionInterface::MAX_MEMCARD_SLOT> m_gci_paths;
83
84 ConfigBool* m_gba_save_rom_path;
85 QPushButton* m_gba_browse_bios;
86 ConfigUserPath* m_gba_bios_edit;
87 std::array<QPushButton*, 5> m_gba_browse_roms;
88 std::array<ConfigText*, 5> m_gba_rom_edits;
89 QPushButton* m_gba_browse_saves;
90 ConfigUserPath* m_gba_saves_edit;
91 };