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