pycar.gui package

Submodules

pycar.gui.car_controls module

Car control widgets

Author:

Petar V Peshev @ p.v.peshev@student.tudelft.nl

TODO: implement a custom logger

class pycar.gui.car_controls.AbstractControlButton(car: Car, control_name: str, icon_name: str, *, parent: QWidget | None = None)

Bases: QPushButton

Abstract car control button widget

Attributes:
_control_name: str

Name of the control button [protected]

_car: Car

Instance of the car object [protected]

Methods:
_is_pressed: None

Performs an action when the control button is pressed [protected]

class pycar.gui.car_controls.BackwardControlButton(car: Car)

Bases: AbstractControlButton

Control button to move backwards

class pycar.gui.car_controls.CarControlWidget(car: Car)

Bases: QWidget

Window object containing motor and direction controls

class pycar.gui.car_controls.ForwardControlButton(car: Car)

Bases: AbstractControlButton

Control button to move forward

class pycar.gui.car_controls.LeftControlButton(car: Car)

Bases: AbstractControlButton

Control button to move left

class pycar.gui.car_controls.RightControlButton(car: Car)

Bases: AbstractControlButton

Control button to move right

pycar.gui.serial_select_widget module

Widget used to select serial port

Author:

Petar V Peshev @ p.v.peshev@student.tudelft.nl

Issue: After selection and closing the window, the object is copied automatically into several consecutive

addresses, causing something similar to overflow

class pycar.gui.serial_select_widget.SerialSelectWidget(serial_devices: List[str])

Bases: QWidget

Widget used to select serial port; the serial port is selected through a dropdown menu. Additional option for simulation, selection of PTY port is available. After selection, the window is closed.

Attributes:
__current_selection: Optional[str]

Holds the value of the selection [private]

Methods:
__select_device: None

Called when a selection is done; saves the selected device into internal attribute and closes the window after selection [private]

Property:
current_selection: str

Returns the selection

property current_selection: str

Returns the selection

Returns:

The serial port selection

Return type:

str

Module contents