SimpleIntModel
class SimpleIntModel(AbstractValueModel):
A very simple Int model.
Properies / Methods
def max(self) -> int:
This property holds the model’s minimum value. type : int
def max(self, arg1: int) -> None:
This property holds the model’s minimum value.
def min(self) -> int:
This property holds the model’s minimum value. type : int
def min(self, arg1: int) -> None:
This property holds the model’s minimum value.
Inherited
class AbstractValueModel():
Properies / Methods:
Show...
def _value_changed(self) -> None:
Called when any data of the model is changed. It will notify the subscribed widgets.
def add_begin_edit_fn(self, arg0: typing.Callable[[AbstractValueModel], None]) -> int:
Adds the function that will be called every time the user starts the editing. The id of the callback that is used to remove the callback.
def add_end_edit_fn(self, arg0: typing.Callable[[AbstractValueModel], None]) -> int:
Adds the function that will be called every time the user finishes the editing. The id of the callback that is used to remove the callback.
def add_value_changed_fn(self, arg0: typing.Callable[[AbstractValueModel], None]) -> int:
Adds the function that will be called every time the value changes. The id of the callback that is used to remove the callback.
def begin_edit(self) -> None:
Called when the user starts the editing. If it’s a field, this method is called when the user activates the field and places the cursor inside. This method should be reimplemented.
def end_edit(self) -> None:
Called when the user finishes the editing. If it’s a field, this method is called when the user presses Enter or selects another field for editing. It’s useful for undo/redo. This method should be reimplemented.
def get_value_as_bool(self) -> bool:
Return the bool representation of the value.
def get_value_as_float(self) -> float:
Return the float representation of the value.
def get_value_as_int(self) -> int:
Return the int representation of the value.
def get_value_as_string(self) -> str:
Return the string representation of the value.
def remove_begin_edit_fn(self, arg0: int) -> None:
Remove the callback by its id. ### Arguments: id : The id that addBeginEditFn returns.
def remove_end_edit_fn(self, arg0: int) -> None:
Remove the callback by its id. ### Arguments: id : The id that addEndEditFn returns.
def remove_value_changed_fn(self, arg0: int) -> None:
Remove the callback by its id. ### Arguments: id : The id that addValueChangedFn returns.
def set_value(self, value: bool) -> None:
Set the value. Set the value. Set the value. Set the value.
def subscribe_begin_edit_fn(self, arg0: typing.Callable[[AbstractValueModel], None]) -> carb._carb.Subscription:
Adds the function that will be called every time the user starts the editing. The id of the callback that is used to remove the callback.
def subscribe_end_edit_fn(self, arg0: typing.Callable[[AbstractValueModel], None]) -> carb._carb.Subscription:
Adds the function that will be called every time the user finishes the editing. The id of the callback that is used to remove the callback.
def subscribe_value_changed_fn(self, arg0: typing.Callable[[AbstractValueModel], None]) -> carb._carb.Subscription:
Adds the function that will be called every time the value changes. The id of the callback that is used to remove the callback.
def as_bool(self) -> bool:
Return the bool representation of the value. type : bool
def as_bool(self, arg1: bool) -> None:
Return the bool representation of the value.
def as_float(self) -> float:
Return the float representation of the value. type : float
def as_float(self, arg1: float) -> None:
Return the float representation of the value.
def as_int(self) -> int:
Return the int representation of the value. type : int
def as_int(self, arg1: int) -> None:
Return the int representation of the value.
def as_string(self) -> str:
Return the string representation of the value. type : str
def as_string(self, arg1: str) -> None:
Return the string representation of the value.