mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-21 15:45:46 +00:00
shared_widget: Refactor again
Starting with combobox Putting code specific to the sub-widget in their own function.
This commit is contained in:
parent
0f8a902d8c
commit
1d7fb41d59
2 changed files with 121 additions and 52 deletions
|
@ -43,7 +43,7 @@ public:
|
|||
const QString& string = QStringLiteral(""));
|
||||
virtual ~Widget();
|
||||
|
||||
bool Valid();
|
||||
bool Valid() const;
|
||||
|
||||
[[nodiscard]] static QPushButton* CreateRestoreGlobalButton(bool using_global, QWidget* parent);
|
||||
|
||||
|
@ -56,12 +56,16 @@ public:
|
|||
QDateTimeEdit* date_time_edit{};
|
||||
|
||||
private:
|
||||
void SetupComponent(const QString& label, std::function<void()>& load_func, bool managed,
|
||||
RequestType request, Settings::BasicSetting* other_setting);
|
||||
|
||||
QLabel* CreateLabel(const QString& text);
|
||||
QHBoxLayout* CreateCheckBox(Settings::BasicSetting* bool_setting, const QString& label,
|
||||
std::function<void()>& load_func, bool managed);
|
||||
|
||||
void CreateCombobox(const QString& label, std::function<void()>& load_func, bool managed,
|
||||
Settings::BasicSetting* const other_setting = nullptr);
|
||||
QWidget* CreateCombobox(std::function<std::string()>& serializer,
|
||||
std::function<void()>& restore_func,
|
||||
const std::function<void()>& touched);
|
||||
void CreateLineEdit(const QString& label, std::function<void()>& load_func, bool managed,
|
||||
Settings::BasicSetting* const other_setting = nullptr);
|
||||
void CreateHexEdit(const QString& label, std::function<void()>& load_func, bool managed,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue