GUI¶
A class responsible for rendering the user interface.
Interface¶
- class src.data_acquisition.gui.Gui[source]¶
Bases:
ABC- abstractmethod draw_rectangle(*, color: Color, top_left_point: Point, width: int, height: int) None[source]¶
- abstractmethod on_init(callback: Callable[[], None]) None[source]¶
Used to register a callback function that will be called when the GUI is ready.
How to subclass¶
Subclasses should implement the following methods:
draw_image(image_path: Path)draw_rectangle(*, color: Color, top_left_point: Point, width: int, height: int)draw_text(*, font_size: int, text: str, color: Color)draw_uniform_background(color: Color)get_window_size() -> ElementSizeon_init(callback: Callable[[], None])play_sound(sound_path: Path)start()stop()subscribe_to_event_and_get_id(*, event: EventType, callback: Callable[[], None]) -> intunsubscribe_from_event_by_id(event_id: int)