header_widget
anomaly_match_ui.widgets.header_widget
¶
Reusable header widget with ESA/AM branding, version, log controls, and help.
HeaderWidget(app, out_widget=None, *, show_back_button=False, back_to='main_menu', config_text='')
¶
Reusable application header bar with ESA/AM branding.
Supports two modes controlled by constructor arguments:
- Main-menu mode (default): version left, dual logos centred, help right.
- Sub-screen mode (
out_widgetprovided): adds back button, log-level dropdown, and log-toggle button.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
app
|
AnomalyMatchApp
|
The parent application instance (used for navigation). |
required |
out_widget
|
Output | None
|
The output widget for terminal logs. |
None
|
show_back_button
|
bool
|
If |
False
|
back_to
|
str
|
Screen name to navigate to when back is pressed.
Defaults to |
'main_menu'
|
Source code in anomaly_match_ui/widgets/header_widget.py
set_back_to(screen_name)
¶
Re-target the back button at screen_name on the next click.
Image-detail navigation needs this — the same screen serves both training and prediction galleries, so the back-button target depends on which gallery navigated here (#427 / #434 follow-up).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
screen_name
|
str
|
Screen name to navigate to on back-click. |
required |
Source code in anomaly_match_ui/widgets/header_widget.py
set_config_text(text)
¶
Update the config info bar below the header.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
HTML content for the config bar. Empty string hides it. |
required |