mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 21:30:19 -06:00
DolphinQt: Refactor, add ConfigControl class
This reduces code duplication in the different ConfigControls. This is helpful for the next commit, which will modify the now deduplicated code.
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "DolphinQt/Config/ConfigControls/ConfigControl.h"
|
||||
#include "DolphinQt/Config/ToolTipControls/ToolTipCheckBox.h"
|
||||
|
||||
namespace Config
|
||||
@ -11,12 +12,15 @@ template <typename T>
|
||||
class Info;
|
||||
}
|
||||
|
||||
class ConfigBool : public ToolTipCheckBox
|
||||
class ConfigBool final : public ConfigControl<ToolTipCheckBox>
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ConfigBool(const QString& label, const Config::Info<bool>& setting, bool reverse = false);
|
||||
|
||||
protected:
|
||||
void OnConfigChanged() override;
|
||||
|
||||
private:
|
||||
void Update();
|
||||
|
||||
|
Reference in New Issue
Block a user