configure_graphics_advance: Generate UI at runtime

We can iterate through the AdvancedGraphics settings and generate the UI
during runtime. This doesn't help runtime efficiency, but it helps a ton
in reducing the amount of work a developer needs in order to add a new
setting.
This commit is contained in:
lat9nq
2023-05-07 09:48:26 -04:00
parent b11b4be7cb
commit a007ac6b9c
15 changed files with 449 additions and 400 deletions

View File

@ -32,13 +32,15 @@ ConfigureDialog::ConfigureDialog(QWidget* parent, HotkeyRegistry& registry_,
std::vector<VkDeviceInfo::Record>& vk_device_records,
Core::System& system_, bool enable_web_config)
: QDialog(parent), ui{std::make_unique<Ui::ConfigureDialog>()},
registry(registry_), system{system_}, audio_tab{std::make_unique<ConfigureAudio>(
system_, nullptr, this)},
registry(registry_), system{system_},
translations{ConfigurationShared::InitializeTranslations(this)},
audio_tab{std::make_unique<ConfigureAudio>(system_, nullptr, this)},
cpu_tab{std::make_unique<ConfigureCpu>(system_, nullptr, this)},
debug_tab_tab{std::make_unique<ConfigureDebugTab>(system_, this)},
filesystem_tab{std::make_unique<ConfigureFilesystem>(this)},
general_tab{std::make_unique<ConfigureGeneral>(system_, nullptr, this)},
graphics_advanced_tab{std::make_unique<ConfigureGraphicsAdvanced>(system_, nullptr, this)},
graphics_advanced_tab{
std::make_unique<ConfigureGraphicsAdvanced>(system_, nullptr, *translations, this)},
graphics_tab{std::make_unique<ConfigureGraphics>(
system_, vk_device_records, [&]() { graphics_advanced_tab->ExposeComputeOption(); },
nullptr, this)},