upsies.uis.tui.jobwidgets.base
Classes
- class upsies.uis.tui.jobwidgets.base.JobWidgetBase(job, app)[source]
Bases:
ABCUser-interaction and information display for
JobBaseinstance- abstractmethod setup()[source]
Called on object creation
Create widgets and register
jobcallbacks.
- abstract property runtime_widget
Interactive or status widget that is displayed while this job is running
- Returns:
Windowobject or None
- property is_interactive
Whether this job may require user interaction at any point
Subclasses should hardcode this as a class attribute to True or False. The default implementation tries to guess interactivity by finding a focusable widget. This is expensive and can be inaccurate because widgets come and go.
- property keybindings_global
Application-wide
prompt_toolkit.key_binding.KeyBindingsinstanceThese keybindings are always active as long as the TUI is running, regardless of which widget is focused. This also makes it possible to bind keys for unfocusable wigets.
To keep things tidy and intuitive, all keybindings should be sequences of multiple keys. The first key should always start with
c-<x>wherecstands forControland<x>is a character that is associated with the job’slabel.For example,
CreateTorrentJobkeybindings start withc-tandSceneCheckJobkeybindings start withc-s.
- property keybindings_local
Widget-wide
prompt_toolkit.key_binding.KeyBindingsinstanceThese keybindings are only active as long as this widget is focused. If there are conflicts, local keybindings take precedence over
global keybindings.