pyvisor.GUI.tab_buttons package

Submodules

pyvisor.GUI.tab_buttons.assign_button_box module

class pyvisor.GUI.tab_buttons.assign_button_box.AssignButtonBox(*args: Any, **kwargs: Any)[source]

Bases: QWidget

Widget for a single button-to-action assignment.

Shows the action name, current binding, and an “assign button” control. For gamepads, opens a dialog that polls for input; for keyboards, opens a text entry dialog.

assign_button()[source]
button_assignment_changed(action: ScorerAction, is_behaviour: bool)[source]
closeEvent(a0: PyQt5.QtGui.QCloseEvent) None[source]
remove(behaviour: Behaviour)[source]
set_color(action: ScorerAction)[source]
static waitOnUICpress()[source]

Wait for a gamepad button/axis/hat press with a visible dialog.

pyvisor.GUI.tab_buttons.tab_buttons module

class pyvisor.GUI.tab_buttons.tab_buttons.TabButtons(*args: Any, **kwargs: Any)[source]

Bases: QWidget

Button Assignment tab — bind gamepad/keyboard inputs to actions.

Detects connected input devices via pygame, lets the user assign physical buttons to behaviours and movie controls, and provides default binding presets per device type.

closeEvent(a0: PyQt5.QtGui.QCloseEvent) None[source]
make_animal_behaviour_box(animal: Animal)[source]
make_animals_box()[source]
make_behav_binding_info(key, behav_binding: Behaviour)[source]
make_device_choice()[source]
make_device_feature_info(device_feature, number, animal, behaviour)[source]
make_joystick_info()[source]
make_joystick_info_initial()[source]
make_keyboard_info()[source]
make_movie_actions_box() PyQt5.QtWidgets.QWidget[source]
make_selected_joystick_info()[source]
resizeEvent(event)[source]
set_assignDevice(device)[source]
set_device(device: str)[source]

Called when the user picks a device from the combo box.

synchronizeBehaviourTabAndBindings(animal_number: int, behaviour_dict: List[Dict[str, Any]], behaviour_assignments: Dict[str, Behaviour])[source]

Module contents

Button/key binding assignment tab widgets.