RQInt¶
- class pyreaqtive.models.rqint.RQInt(initial_integer)¶
Bases:
pyreaqtive.models.rqmodel.RQModelReactive Integer Model.
Represents a initial_integer number
- Parameters
initial_integer (int) –
- __init__(initial_integer)¶
Constructor.
- Parameters
initial_integer (int) – Initial value of the model
- _int: int¶
Model store variable
- get()¶
Get value of the model.
- Returns
value of the model
- Return type
int
- set(value)¶
Set value of model.
Will propagate the change to the widgets linked to the model
- Parameters
value (int) – new value of the model
- Return type
None
- increment(delta=1)¶
Increment integer method.
- Parameters
delta (int) – Increment value. Default 1
- Return type
None
- decrement(delta=1)¶
Decrement integer method.
- Parameters
delta (int) – Decrement value. Default 1
- 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
- Return type
str
- __float__()¶
Get value of the model in float format.
- Returns
value of the model converted to float
- Return type
str
- class pyreaqtive.models.rqint.RQComputedInt(function, **kwargs)¶
Bases:
pyreaqtive.models.rqmodel.RQComputedModel,pyreaqtive.models.rqint.RQIntReactive Computed Integer 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
int
- _int: int¶
Model store variable