RQFloat¶
- class pyreaqtive.models.rqfloat.RQFloat(initial_float: float)¶
Bases:
pyreaqtive.models.rqmodel.RQModelReactive Float Model
Represents a floating point number
- __init__(initial_float: float)¶
Constructor
- Parameters
initial_float – Initial value of the model
- _float: float¶
Model store variable
- get() → float¶
Get value of the model
- Returns
value of the model
- Return type
float
- set(value: float) → None¶
Set value of model
Will propagate the change to the widgets linked to the model
- Parameters
value – new value of the model
- __str__() → str¶
Get value of the model in string format
- Returns
value of the model converted to string
- Return type
str
- __int__() → int¶
Get value of the model in integer format
- Returns
value of the model converted to integer
- Return type
str
- __float__() → float¶
Get value of the model in float format
- Returns
value of the model
- Return type
str
- class pyreaqtive.models.rqfloat.RQComputedFloat(function: Callable, **kwargs)¶
Bases:
pyreaqtive.models.rqmodel.RQComputedModel,pyreaqtive.models.rqfloat.RQFloatReactive Computed Float Model
- __init__(function: Callable, **kwargs)¶
Constructor
- Parameters
function – function to calculate the model value from input values
**kwargs – reactive models in the function by variable name as keyword Changes in these models will trigger recalculation of the function
- get() → float¶
Get the computed value
- _float: float¶
Model store variable