Uranium
Application Framework
UM.Settings.Validator.Validator Class Reference

Validates that a SettingInstance's value is within a certain minimum and maximum value. More...

Inheritance diagram for UM.Settings.Validator.Validator:
UM.Settings.SettingFunction.SettingFunction

Public Member Functions

None __init__ (self, str key)
 Constructor. More...
 
Any __call__ (self, ContainerInterface value_provider, Optional[PropertyEvaluationContext] context=None)
 Perform the actual validation.
 
- Public Member Functions inherited from UM.Settings.SettingFunction.SettingFunction
bool __eq__ (self, other)
 
bool isValid (self)
 Returns whether the function is ready to be executed. More...
 
FrozenSet[str] getUsedSettingKeys (self)
 Retrieve a set of the keys (strings) of all the settings used in this function. More...
 
str __str__ (self)
 
str __repr__ (self)
 
Dict[str, Any] __getstate__ (self)
 To support Pickle. More...
 
None __setstate__ (self, Dict[str, Any] state)
 
None registerOperator (cls, str name, Callable operator)
 Expose a custom function to the code executed by SettingFunction. More...
 

Detailed Description

Validates that a SettingInstance's value is within a certain minimum and maximum value.

This class performs validation of any value that has lt and gt implemented, but it is primarily used for numerical values like integers and floats.

Constructor & Destructor Documentation

◆ __init__()

None UM.Settings.Validator.Validator.__init__ (   self,
str  key 
)

Constructor.

Parameters
instanceThe instance this Validator validates.

Reimplemented from UM.Settings.SettingFunction.SettingFunction.


The documentation for this class was generated from the following file: