RQFloat¶
- class pyreaqtive.models.rqfloat.RQFloat(initial_float)¶
Bases:
pyreaqtive.models.rqmodel.RQModelReactive Float Model.
Represents a floating point number
- Parameters
initial_float (float) –
- __init__(initial_float)¶
Constructor.
- Parameters
initial_float (float) – Initial value of the model
- _float: float¶
Model store variable.
- get()¶
Get value of the model.
- Returns
value of the model
- Return type
float
- set(value)¶
Set value of model.
Will propagate the change to the widgets linked to the model
- Parameters
value (float) – new value of the model
- Return type
None
- __str__()¶
Get value of the model in string format.
- Returns
value of the model converted to string
- Return type
str
- __int__()¶
Get value of the model in integer format.
- Returns
value of the model converted to integer
- Return type
str
- __float__()¶
Get value of the model in float format.
- Returns
value of the model
- Return type
str
- class pyreaqtive.models.rqfloat.RQComputedFloat(function, **kwargs)¶
Bases:
pyreaqtive.models.rqmodel.RQComputedModel,pyreaqtive.models.rqfloat.RQFloatReactive Computed Float Model.
- Parameters
function (Callable) –
kwargs (pyreaqtive.models.rqmodel.RQModel) –
- __init__(function, **kwargs)¶
Constructor.
- Parameters
function (Callable) – 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
kwargs (pyreaqtive.models.rqmodel.RQModel) –
- get()¶
Get the computed value.
- Return type
float
- _float: float¶
Model store variable.