mirror of
https://github.com/yuzu-emu/yuzu-android
synced 2025-08-04 20:12:24 -07:00
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.
This commit is contained in:
@@ -18,13 +18,15 @@ namespace Ui {
|
||||
class ConfigureCpu;
|
||||
}
|
||||
|
||||
namespace ConfigurationShared {
|
||||
class Builder;
|
||||
}
|
||||
|
||||
class ConfigureCpu : public ConfigurationShared::Tab {
|
||||
public:
|
||||
explicit ConfigureCpu(const Core::System& system_,
|
||||
std::shared_ptr<std::forward_list<ConfigurationShared::Tab*>> group,
|
||||
const ConfigurationShared::TranslationMap& translations,
|
||||
const ConfigurationShared::ComboboxTranslationMap& combobox_translations,
|
||||
QWidget* parent = nullptr);
|
||||
const ConfigurationShared::Builder& builder, QWidget* parent = nullptr);
|
||||
~ConfigureCpu() override;
|
||||
|
||||
void ApplyConfiguration() override;
|
||||
@@ -36,15 +38,13 @@ private:
|
||||
|
||||
void UpdateGroup(int index);
|
||||
|
||||
void Setup();
|
||||
void Setup(const ConfigurationShared::Builder& builder);
|
||||
|
||||
std::unique_ptr<Ui::ConfigureCpu> ui;
|
||||
|
||||
const Core::System& system;
|
||||
|
||||
const ConfigurationShared::TranslationMap& translations;
|
||||
const ConfigurationShared::ComboboxTranslationMap& combobox_translations;
|
||||
|
||||
std::forward_list<std::function<void(bool)>> apply_funcs{};
|
||||
|
||||
QComboBox* accuracy_combobox;
|
||||
|
Reference in New Issue
Block a user