mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-21 15:45:46 +00:00
shared_widget: Forward-port Citra changes
Seemed like a good time to move these over. Also remove usage of std::sto{l,ll,ul,f,d}
This commit is contained in:
parent
81debaff3b
commit
c750d6965a
2 changed files with 134 additions and 31 deletions
|
@ -22,6 +22,7 @@ class QObject;
|
|||
class QPushButton;
|
||||
class QSlider;
|
||||
class QSpinBox;
|
||||
class QDoubleSpinBox;
|
||||
class QRadioButton;
|
||||
|
||||
namespace Settings {
|
||||
|
@ -43,6 +44,9 @@ enum class RequestType {
|
|||
MaxEnum,
|
||||
};
|
||||
|
||||
constexpr const float default_multiplier{1.f};
|
||||
constexpr const float default_float_multiplier{100.f};
|
||||
|
||||
class Widget : public QWidget {
|
||||
Q_OBJECT
|
||||
|
||||
|
@ -89,6 +93,7 @@ public:
|
|||
QPushButton* restore_button{}; ///< Restore button for custom configurations
|
||||
QLineEdit* line_edit{}; ///< QLineEdit, used for LineEdit and HexEdit
|
||||
QSpinBox* spinbox{};
|
||||
QDoubleSpinBox* double_spinbox{};
|
||||
QCheckBox* checkbox{};
|
||||
QSlider* slider{};
|
||||
QComboBox* combobox{};
|
||||
|
@ -126,6 +131,9 @@ private:
|
|||
const std::function<void()>& touch);
|
||||
QWidget* CreateSpinBox(const QString& suffix, std::function<std::string()>& serializer,
|
||||
std::function<void()>& restore_func, const std::function<void()>& touch);
|
||||
QWidget* CreateDoubleSpinBox(const QString& suffix, std::function<std::string()>& serializer,
|
||||
std::function<void()>& restore_func,
|
||||
const std::function<void()>& touch);
|
||||
|
||||
QWidget* parent;
|
||||
const TranslationMap& translations;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue