pyvisor.GUI.tab_buttons package

Submodules

pyvisor.GUI.tab_buttons.assign_button_box module

class pyvisor.GUI.tab_buttons.assign_button_box.AssignButtonBox(parent_widget: QWidget, gui_data_interface: GUIDataInterface, action: ScorerAction, color: str, is_behaviour: bool)[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(self, a0: 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(parent: QWidget, gui_data_interface: GUIDataInterface)[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(self, a0: 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() QWidget[source]
make_selected_joystick_info()[source]
resizeEvent(self, a0: QResizeEvent | None)[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.