mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 01:20:06 +00:00 
			
		
		
		
	Expose minimum and maximum values in settings variable
This commit is contained in:
		
							parent
							
								
									9cc53bf20f
								
							
						
					
					
						commit
						ab91bf9e8d
					
				
					 2 changed files with 27 additions and 2 deletions
				
			
		|  | @ -3,8 +3,6 @@ | |||
| #include <scwx/qt/settings/settings_variable.hpp> | ||||
| #include <scwx/util/logger.hpp> | ||||
| 
 | ||||
| #include <optional> | ||||
| 
 | ||||
| #include <boost/json.hpp> | ||||
| #include <fmt/ostream.h> | ||||
| #include <QAbstractButton> | ||||
|  | @ -199,12 +197,24 @@ void SettingsVariable<T>::SetMinimum(const T& value) | |||
|    p->minimum_ = value; | ||||
| } | ||||
| 
 | ||||
| template<class T> | ||||
| std::optional<T> SettingsVariable<T>::GetMinimum() const | ||||
| { | ||||
|    return p->minimum_; | ||||
| } | ||||
| 
 | ||||
| template<class T> | ||||
| void SettingsVariable<T>::SetMaximum(const T& value) | ||||
| { | ||||
|    p->maximum_ = value; | ||||
| } | ||||
| 
 | ||||
| template<class T> | ||||
| std::optional<T> SettingsVariable<T>::GetMaximum() const | ||||
| { | ||||
|    return p->maximum_; | ||||
| } | ||||
| 
 | ||||
| template<class T> | ||||
| void SettingsVariable<T>::SetValidator(std::function<bool(const T&)> validator) | ||||
| { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat