mirror of
				https://github.com/dolphin-emu/dolphin.git
				synced 2025-10-25 01:19:19 +00:00 
			
		
		
		
	qOverload is used to disambiguate pointers to overloaded functions, but most of the usages in the code base were with non-overloaded functions.
		
			
				
	
	
		
			32 lines
		
	
	
	
		
			758 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
	
		
			758 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| // Copyright 2019 Dolphin Emulator Project
 | |
| // SPDX-License-Identifier: GPL-2.0-or-later
 | |
| 
 | |
| #include "DolphinQt/TAS/TASSpinBox.h"
 | |
| 
 | |
| #include "DolphinQt/QtUtils/QueueOnObject.h"
 | |
| 
 | |
| TASSpinBox::TASSpinBox(QWidget* parent) : QSpinBox(parent)
 | |
| {
 | |
|   connect(this, &TASSpinBox::valueChanged, this, &TASSpinBox::OnUIValueChanged);
 | |
| }
 | |
| 
 | |
| int TASSpinBox::GetValue() const
 | |
| {
 | |
|   return m_state.GetValue();
 | |
| }
 | |
| 
 | |
| void TASSpinBox::OnControllerValueChanged(int new_value)
 | |
| {
 | |
|   if (m_state.OnControllerValueChanged(new_value))
 | |
|     QueueOnObject(this, &TASSpinBox::ApplyControllerValueChange);
 | |
| }
 | |
| 
 | |
| void TASSpinBox::OnUIValueChanged(int new_value)
 | |
| {
 | |
|   m_state.OnUIValueChanged(new_value);
 | |
| }
 | |
| 
 | |
| void TASSpinBox::ApplyControllerValueChange()
 | |
| {
 | |
|   setValue(m_state.ApplyControllerValueChange());
 | |
| }
 |