Debian Codegraph @

Source/Core/DolphinQt/Config/ConfigControls/ConfigRadio.h

raw symbols SCIP
1 // Copyright 2018 Dolphin Emulator Project
2 // SPDX-License-Identifier: GPL-2.0-or-later
3
4 #pragma once
5
6 #include "DolphinQt/Config/ConfigControls/ConfigControl.h"
7 #include "DolphinQt/Config/ToolTipControls/ToolTipRadioButton.h"
8
9 #include "Common/Config/ConfigInfo.h"
10
11 class ConfigRadioInt final : public ConfigControl<ToolTipRadioButton>
12 {
13 Q_OBJECT
14 public:
15 ConfigRadioInt(const QString& label, const Config::Info<int>& setting, int value,
16 Config::Layer* layer = nullptr);
17
18 signals:
19 // Since selecting a new radio button deselects the old one, ::toggled will generate two signals.
20 // These are convenience functions so you can receive only one signal if desired.
21 void OnSelected(int new_value);
22 void OnDeselected(int old_value);
23
24 protected:
25 void OnConfigChanged() override;
26
27 private:
28 void Update();
29
30 const Config::Info<int> m_setting;
31 int m_value;
32 };