multigp_toolkit.uimanager#

User Interface Management

Classes#

UImanager

Manage the UI updates for the plugin

Module Contents#

class multigp_toolkit.uimanager.UImanager(rhapi, multigp)#

Manage the UI updates for the plugin

Parameters:
_rhapi: RHAPI.RHAPI#
_multigp: multigp_toolkit.multigpapi.MultiGPAPI#
_chapter_name: str | None = None#

The imported chapter name

update_panels(_args=None)#

Updates the shown panels based on the current system configuration

Parameters:

_args (Union[dict, None]) – Default args passed to the function, defaults to None

set_chapter_name(chapter_name)#

Sets the chapter name to use in the user interface

Parameters:

chapter_name (str) – The chapter name

create_race_import_menu(callback)#

Generates the race import menu

Parameters:

callback (collections.abc.Callable) – The callback to register the button to.

show_race_import_menu(show=True)#

Either Displays or hides the pilot import menu

Parameters:

show – Shows the race import menu if True,

hides the menu if set to False, defaults to True

create_pilot_import_menu(callback)#

Creates the pilots import menu.

Parameters:

callback (collections.abc.Callable) – The callback to register the button to.

show_pilot_import_menu(show=True)#

Either Displays or hides the pilot import menu

Parameters:

show – Shows the pilot import menu if True,

hides the menu if set to False, defaults to True

create_zippyq_controls(callback)#

Creates the ZippyQ controls menu

Parameters:

callback (collections.abc.Callable) – The callback to register the button to.

show_zippyq_controls(show=True)#

Either Displays or hides the zippyq import menu

Parameters:

show – Shows the ZippyQ control menu if True,

hides the menu if set to False, defaults to True

create_results_export_menu(callback)#

Create the results export menu

Parameters:
  • fpvs_installed – Whether the FPVScores-Sync plugin is installed or not

  • callback (collections.abc.Callable) – The callback to use for uploading

show_results_export_menu(show=True)#

Either Displays or hides the results export menu

Parameters:

show – Shows the results export menu if True, hides the menu if set to False,

defaults to True

create_gq_export_menu(callback)#

Generates the Global Qualifier export menu,

Parameters:

callback (collections.abc.Callable) – The callback to register for the button press

show_gq_export_menu(show=True)#

Either Displays or hides the Global Qualifier export menu

Parameters:

show – Shows the Global Qualifier export menu if True, hides the menu if

set to False, defaults to True

mgp_event_selector(args=None)#

Generates or updates the selector for MultiGP event importing

Parameters:

args (Union[dict, None]) – args passed as the button callback, defaults to None

results_class_selector(args=None)#

Generates or updates the selector for pushing race results

Parameters:

args (Union[dict, None]) – Callback args, defaults to None

clear_multi_class_selector()#

Clears all selectors that were generated for an imported multi-class event.

zq_class_selector(_args=None)#

Generates or updates the selector for selecting the ZippyQ class from a multi-class event

Parameters:

_args (Union[dict, None]) – Generic args passed to the callback, defaults to None