LabelButtons

class LabelButtons(name: str, direction: str, row: int, column: int, width: int, color: str, layout: Layout, width_res: int = 640, height_res: int = 480)[source]

Bases: object

Class to manage labels with increase/decrease buttons for settings.

__init__(name: str, direction: str, row: int, column: int, width: int, color: str, layout: Layout, width_res: int = 640, height_res: int = 480) None[source]

Initializes the LabelButtons instance.

Parameters:
  • name (str) – The name of the setting.

  • direction (str) – The specific attribute (e.g., ‘left’, ‘top’, ‘threshold’).

  • row (int) – The row position in the layout.

  • column (int) – The column position in the layout.

  • width (int) – The width of the label.

  • color (str) – The color of the text.

  • layout (Layout) – The parent layout.

  • width_res (int, optional) – Width resolution. Defaults to 640.

  • height_res (int, optional) – Height resolution. Defaults to 480.

Methods

__init__(name, direction, row, column, ...)

Initializes the LabelButtons instance.

decrease_value()

Decreases the value of the setting safely.

increase_value()

Increases the value of the setting safely.

start_decreasing()

Starts the timer to decrease the value continuously.

start_increasing()

Starts the timer to increase the value continuously.

stop_timer()

Stops the timers and saves the new value.

increase_value() None[source]

Increases the value of the setting safely.

decrease_value() None[source]

Decreases the value of the setting safely.

start_increasing() None[source]

Starts the timer to increase the value continuously.

start_decreasing() None[source]

Starts the timer to decrease the value continuously.

stop_timer() None[source]

Stops the timers and saves the new value.