atlas.core.gui package

PySide6 desktop GUI for ATLAS.

Subpackages

Submodules

atlas.core.gui.app module

atlas.core.gui.app_params module

Application-wide GUI parameters.

class atlas.core.gui.app_params.ApplicationParameters

Bases: object

Holds application-wide parameters.

FONT_FAMILIES_MONOSPACE = ['Fira Code', 'monospace']
FONT_FAMILIES_REGULAR = ['Noto Sans', 'Sans Serif', 'Arial']
atlas.core.gui.app_params.pretty_label(key: str) str

Turn a snake_case schema key into a human-readable label.

key.replace('_', ' ').title() but with acronyms preserved.

atlas.core.gui.gui module

A PyQt-based GUI for the ATLAS library.

This application provides a user-friendly interface to configure and run ATLAS processes. It uses a YAML schema as a template to dynamically build the GUI, and outputs the configuration in TOML format.

class atlas.core.gui.gui.ApplicationParameters

Bases: object

Holds application-wide parameters.

FONT_FAMILIES_MONOSPACE = ['Fira Code', 'monospace']
FONT_FAMILIES_REGULAR = ['Noto Sans', 'Sans Serif', 'Arial']
class atlas.core.gui.gui.InputFileTab(*args: Any, **kwargs: Any)

Bases: QWidget

Manages UI for creating and editing TOML files based on a schema.

add_dynamic_item(key, name='new_item', data=None)
check_configuration()
eventFilter(source, event)
load_schema(filepath)
load_toml_from_dialog()
on_schema_selected(index)
on_toml_text_changed()
run_process()
save_to_file(filepath=None)
set_highlighter_theme(theme_name)

Creates a new highlighter with the selected theme and applies it.

update_toml_preview()
class atlas.core.gui.gui.LauncherDialog(*args: Any, **kwargs: Any)

Bases: QDialog

A modal dialog that serves as the application’s entry point.

class atlas.core.gui.gui.MainWindow(*args: Any, **kwargs: Any)

Bases: QMainWindow

The main window of the application.

log(message)
on_process_finished(return_code)
class atlas.core.gui.gui.ProcessWorker(*args: Any, **kwargs: Any)

Bases: QThread

Run a command in a separate thread to keep the GUI responsive.

log_message

alias of str

process_finished

alias of int

run()
stop()
class atlas.core.gui.gui.TomlHighlighter(*args: Any, **kwargs: Any)

Bases: QSyntaxHighlighter

A syntax highlighter for TOML format that can be applied to a QTextDocument. It supports multiple color themes.

THEMES = {'Catppuccin Latte': {'background': None, 'comment': '#9ca0b0', 'keyword': '#8839ef', 'number': '#e64553', 'section': '#40a02b', 'string': '#d20f39'}, 'Default': {'background': None, 'comment': '#808080', 'keyword': '#0033cc', 'number': '#c500c5', 'section': '#107c10', 'string': '#A31515'}, 'Gruvbox Light': {'background': None, 'comment': '#928374', 'keyword': '#427b58', 'number': '#8f3f71', 'section': '#79740e', 'string': '#9d0006'}, 'Solarized Light': {'background': '#fdf6e3', 'comment': '#93a1a1', 'keyword': '#d33682', 'number': '#cb4b16', 'section': '#859900', 'string': '#dc322f'}}
highlightBlock(text)

Apply syntax highlighting to the given block of text.

atlas.core.gui.hub module

Hub dialog, entry point for atl_gui.

The Hub lets the user create, open, or pick a recently-used project. On success it sets self.selected_project to an open Project instance and accepts; otherwise the dialog is rejected and the application exits.

class atlas.core.gui.hub.HubDialog(*args: Any, **kwargs: Any)

Bases: QDialog

Entry-point dialog: create / open / pick recent project.

class atlas.core.gui.hub.NewProjectDialog(*args: Any, **kwargs: Any)

Bases: QDialog

Small modal to pick a parent directory and project name.

atlas.core.gui.icons module

Theme-adaptive icon loading for the ATLAS GUI.

SVG icons ship with fill="#000" and the fill is replaced at load time to match the active theme’s foreground colour.

atlas.core.gui.icons.app_icon() PySide6.QtGui.QIcon

Return the application icon for window/tray use.

atlas.core.gui.icons.ensure_arrow_svgs(fg_color: str) tuple[str, str]

Generate themed spinbox arrow SVGs and return (up_path, down_path).

Results are cached per colour so the files are written at most once per theme.

atlas.core.gui.icons.themed_icon(name: str, color: str, size: int = 24) PySide6.QtGui.QIcon

Return a QIcon for name recoloured to color.

atlas.core.gui.icons.tray_icon() PySide6.QtGui.QIcon

Return the icon for the system tray.

Always uses the light version with a blue accent since system trays render on an independent background.

atlas.core.gui.themes module

Application themes for the ATLAS GUI.

Each theme is derived from a Gogh terminal color scheme and mapped onto Qt widget roles. The mapping uses the 16 ANSI colours plus background, foreground, and cursor from the Gogh palette:

background → window / base background foreground → text colour color_01 → dark accent (borders, subtle text in dark themes) color_02 → red / error / danger color_03 → green / success / done color_04 → yellow / warning / in-progress color_05 → blue / primary / links color_06 → magenta / accent color_07 → cyan / info color_08 → light grey (alt row, muted text in dark themes) color_09–16 → bright variants of 01–08

build_stylesheet(theme_name) returns a full QSS string.

class atlas.core.gui.themes.Theme(name: 'str', variant: 'str', background: 'str', foreground: 'str', cursor: 'str', c01: 'str', c02: 'str', c03: 'str', c04: 'str', c05: 'str', c06: 'str', c07: 'str', c08: 'str', c09: 'str', c10: 'str', c11: 'str', c12: 'str', c13: 'str', c14: 'str', c15: 'str', c16: 'str')

Bases: object

background: str
c01: str
c02: str
c03: str
c04: str
c05: str
c06: str
c07: str
c08: str
c09: str
c10: str
c11: str
c12: str
c13: str
c14: str
c15: str
c16: str
cursor: str
foreground: str
name: str
variant: str
atlas.core.gui.themes.apply_theme_to_app(theme_name: str, *, force: bool = False, verbose: bool = False) None

Apply theme to QApplication via QPalette + static QSS.

The QSS uses palette(...) references and is set only once (at startup, when few widgets exist). Subsequent theme switches update the QPalette and selectively re-polish only visible widgets, hidden pages in the QStackedWidget are skipped and re-polished lazily.

atlas.core.gui.themes.build_static_stylesheet() str

Return a static QSS that uses palette(…) references for all colors.

The same QSS works for every theme, only the QPalette changes.

atlas.core.gui.themes.build_stylesheet(theme_name: str) str

Generate a full QSS stylesheet for the given theme.

Deprecated since version Use: build_static_stylesheet + build_theme_palette.

atlas.core.gui.themes.build_theme_palette(theme_name: str)

Build a QPalette with all theme-derived colors mapped to roles.

atlas.core.gui.themes.save_global_toml_theme(name: str) None
atlas.core.gui.themes.saved_global_theme() str

Return the globally persisted theme name (via QSettings).

atlas.core.gui.themes.saved_global_toml_theme() str
atlas.core.gui.themes.theme_colors(name: str) dict[str, str]

Return derived colors for the theme (bg, fg, surface, border, etc.).

atlas.core.gui.themes.theme_names() list[str]

Return theme names, light themes first, then dark.

atlas.core.gui.themes.theme_variant(name: str) str

Return ‘light’ or ‘dark’ for the given theme name.

Module contents

PySide6 desktop GUI for ATLAS.