mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-23 23:45:46 +00: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:
parent
62ffaa730f
commit
ad645c29a4
18 changed files with 206 additions and 209 deletions
|
@ -6,7 +6,6 @@
|
|||
#include <memory>
|
||||
#include <QWidget>
|
||||
#include "yuzu/configuration/configuration_shared.h"
|
||||
#include "yuzu/configuration/shared_translation.h"
|
||||
|
||||
namespace Core {
|
||||
class System;
|
||||
|
@ -16,14 +15,16 @@ namespace Ui {
|
|||
class ConfigureGraphicsAdvanced;
|
||||
}
|
||||
|
||||
namespace ConfigurationShared {
|
||||
class Builder;
|
||||
}
|
||||
|
||||
class ConfigureGraphicsAdvanced : public ConfigurationShared::Tab {
|
||||
public:
|
||||
explicit ConfigureGraphicsAdvanced(
|
||||
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);
|
||||
~ConfigureGraphicsAdvanced() override;
|
||||
|
||||
void ApplyConfiguration() override;
|
||||
|
@ -32,14 +33,14 @@ public:
|
|||
void ExposeComputeOption();
|
||||
|
||||
private:
|
||||
void Setup(const ConfigurationShared::Builder& builder);
|
||||
void changeEvent(QEvent* event) override;
|
||||
void RetranslateUI();
|
||||
|
||||
std::unique_ptr<Ui::ConfigureGraphicsAdvanced> ui;
|
||||
|
||||
const Core::System& system;
|
||||
const ConfigurationShared::TranslationMap& translations;
|
||||
const ConfigurationShared::ComboboxTranslationMap& combobox_translations;
|
||||
|
||||
std::forward_list<std::function<void(bool)>> apply_funcs;
|
||||
|
||||
QWidget* checkbox_enable_compute_pipelines{};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue