summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/Config/ConfigControls/ConfigRadio.h
blob: 147c6391f98e71697e4e02f5df7c664c511b6c26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Copyright 2018 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#include "DolphinQt/Config/ToolTipControls/ToolTipRadioButton.h"

#include "Common/Config/Config.h"

class ConfigRadioInt : public ToolTipRadioButton
{
  Q_OBJECT
public:
  ConfigRadioInt(const QString& label, const Config::Info<int>& setting, int value);

signals:
  // Since selecting a new radio button deselects the old one, ::toggled will generate two signals.
  // These are convenience functions so you can receive only one signal if desired.
  void OnSelected(int new_value);
  void OnDeselected(int old_value);

private:
  void Update();

  Config::Info<int> m_setting;
  int m_value;
};