aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/yuzu/configuration/shared_widget.h
diff options
context:
space:
mode:
authorlat9nq <[email protected]>2023-05-09 15:46:07 -0400
committerlat9nq <[email protected]>2023-07-21 10:56:07 -0400
commit97674bc88821b202aa7309208b71f2ab042fc5aa (patch)
treeabdbd2840381fab4e49d749941e4d870e1d7f2ac /src/yuzu/configuration/shared_widget.h
parentdef00e8c55796cc89abf745df2160873cf1c5f80 (diff)
downloadyuzu-android-97674bc88821b202aa7309208b71f2ab042fc5aa.tar.gz
yuzu-android-97674bc88821b202aa7309208b71f2ab042fc5aa.zip
shared_widget: Support checkbox + spinbox
Diffstat (limited to 'src/yuzu/configuration/shared_widget.h')
-rw-r--r--src/yuzu/configuration/shared_widget.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/yuzu/configuration/shared_widget.h b/src/yuzu/configuration/shared_widget.h
index 8d2d7f269..c25d819f0 100644
--- a/src/yuzu/configuration/shared_widget.h
+++ b/src/yuzu/configuration/shared_widget.h
@@ -4,6 +4,7 @@
#include "yuzu/configuration/shared_translation.h"
class QPushButton;
+class QSpinBox;
class QComboBox;
class QLineEdit;
class QSlider;
@@ -32,7 +33,8 @@ public:
Widget(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 = "");
+ const Settings::BasicSetting* other_setting = nullptr,
+ const QString& format = QStringLiteral(""));
virtual ~Widget();
bool Valid();
@@ -42,16 +44,19 @@ public:
QPushButton* restore_button{};
QLineEdit* line_edit{};
+ QSpinBox* spinbox{};
QCheckBox* checkbox{};
QSlider* slider{};
QComboBox* combobox{};
private:
void CreateCheckBox(const QString& label, std::function<void()>& load_func);
- void CreateCheckBoxWithLineEdit(const QString& label, const std::string& text_box_default,
+ void CreateCheckBoxWithLineEdit(const QString& label,
+ const Settings::BasicSetting* other_setting,
std::function<void()>& load_func);
- void CreateCheckBoxWithSpinBox(const QString& label, const std::string& text_box_default,
- std::function<void()>& load_func);
+ void CreateCheckBoxWithSpinBox(const QString& label,
+ const Settings::BasicSetting* other_setting,
+ std::function<void()>& load_func, const QString& suffix);
void CreateCombobox(const QString& label, bool managed, std::function<void()>& load_func);
void CreateLineEdit(const QString& label, bool managed, std::function<void()>& load_func);
void CreateSlider(const QString& label, bool reversed, float multiplier,