diff options
author | lat9nq <22451773+lat9nq@users.noreply.github.com> | 2023-06-21 01:42:42 -0400 |
---|---|---|
committer | lat9nq <22451773+lat9nq@users.noreply.github.com> | 2023-07-21 10:56:55 -0400 |
commit | ad645c29a44bd117cad90bda56e1f4d6296f2666 (patch) | |
tree | 6301d2470cd09ea5ef3bd4007d1aa1c97fe7717d /src/yuzu/configuration/configure_system.h | |
parent | 62ffaa730fabd2101947dd28e50fae6d03162aa4 (diff) |
configuration: Use a builder to create widgets
This gets rid of some repeated code and sets us up to send more
information to the new widget.
Diffstat (limited to 'src/yuzu/configuration/configure_system.h')
-rw-r--r-- | src/yuzu/configuration/configure_system.h | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/yuzu/configuration/configure_system.h b/src/yuzu/configuration/configure_system.h index 4457ccc21e..7f42596981 100644 --- a/src/yuzu/configuration/configure_system.h +++ b/src/yuzu/configuration/configure_system.h @@ -9,13 +9,11 @@ #include <QWidget> #include "yuzu/configuration/configuration_shared.h" -#include "yuzu/configuration/shared_translation.h" class QCheckBox; class QLineEdit; class QComboBox; class QDateTimeEdit; - namespace Core { class System; } @@ -24,13 +22,16 @@ namespace Ui { class ConfigureSystem; } +namespace ConfigurationShared { +class Builder; +} + class ConfigureSystem : public ConfigurationShared::Tab { public: - explicit ConfigureSystem( - Core::System& system_, std::shared_ptr<std::forward_list<ConfigurationShared::Tab*>> group, - const ConfigurationShared::TranslationMap& translations, - const ConfigurationShared::ComboboxTranslationMap& combobox_translations, - QWidget* parent = nullptr); + explicit ConfigureSystem(Core::System& system_, + std::shared_ptr<std::forward_list<ConfigurationShared::Tab*>> group, + const ConfigurationShared::Builder& builder, + QWidget* parent = nullptr); ~ConfigureSystem() override; void ApplyConfiguration() override; @@ -40,7 +41,7 @@ private: void changeEvent(QEvent* event) override; void RetranslateUI(); - void Setup(); + void Setup(const ConfigurationShared::Builder& builder); std::forward_list<std::function<void(bool)>> apply_funcs{}; @@ -48,8 +49,6 @@ private: bool enabled = false; Core::System& system; - const ConfigurationShared::TranslationMap& translations; - const ConfigurationShared::ComboboxTranslationMap& combobox_translations; QCheckBox* rng_seed_checkbox; QLineEdit* rng_seed_edit; |