mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-23 02:45:45 +00:00
configuration: Move CreateWidget to a class
We were passing so many objects between the function and the caller that it needed to be redesigned.
This commit is contained in:
parent
f9310ec1e8
commit
b17ab4d1d5
10 changed files with 507 additions and 453 deletions
|
@ -13,8 +13,6 @@
|
|||
#include "common/settings.h"
|
||||
#include "yuzu/configuration/shared_translation.h"
|
||||
|
||||
class QPushButton;
|
||||
|
||||
namespace ConfigurationShared {
|
||||
|
||||
class Tab : public QWidget {
|
||||
|
@ -43,22 +41,6 @@ enum class CheckState {
|
|||
Count, // Simply the number of states, not a valid checkbox state
|
||||
};
|
||||
|
||||
enum class RequestType {
|
||||
Default,
|
||||
ComboBox,
|
||||
SpinBox,
|
||||
Slider,
|
||||
ReverseSlider,
|
||||
LineEdit,
|
||||
MaxEnum,
|
||||
};
|
||||
|
||||
std::tuple<QWidget*, void*, QPushButton*> CreateWidget(
|
||||
Settings::BasicSetting* setting, const TranslationMap& translations, QWidget* parent,
|
||||
bool runtime_lock, std::forward_list<std::function<void(bool)>>& apply_funcs,
|
||||
RequestType request = RequestType::Default, bool managed = true, float multiplier = 1.0f,
|
||||
const std::string& text_box_default = "");
|
||||
|
||||
// Global-aware apply and set functions
|
||||
|
||||
// ApplyPerGameSetting, given a Settings::Setting and a Qt UI element, properly applies a Setting
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue