plesty.lib.ui.qt.app

Launching a shell: the two lines between a list of panels and a window.

Functions

application(→ PySide6.QtWidgets.QApplication)

Return the running Qt application, creating it when there is none.

build_shell(→ plesty.lib.ui.qt.shell.Shell)

Create a shell hosting panels, without starting the event loop.

run(→ int)

Open a shell on panels and run it until the window is closed.

Module Contents

plesty.lib.ui.qt.app.application(name: str = 'PLESTY') PySide6.QtWidgets.QApplication

Return the running Qt application, creating it when there is none.

Parameters:

name (str) – Application name, used by the window manager.

Returns:

The QApplication instance.

Return type:

PySide6.QtWidgets.QApplication

plesty.lib.ui.qt.app.build_shell(panels: Sequence[plesty.lib.ui.panel.Panel], *, title: str = 'PLESTY', theme: plesty.lib.ui.theme.Theme | None = None, interval_ms: int = 500, layout_file: str | pathlib.Path | None = None, remember_layout: bool = True) plesty.lib.ui.qt.shell.Shell

Create a shell hosting panels, without starting the event loop.

Parameters:
  • panels (Sequence[plesty.lib.ui.panel.Panel]) – Panels to add, in the order they should be docked.

  • title (str) – Window title and layout key.

  • theme (Optional[plesty.lib.ui.theme.Theme]) – Palette; None loads the packaged PLESTY theme.

  • interval_ms (int) – Panel refresh interval in milliseconds.

  • layout_file (Optional[str | pathlib.Path]) – Where the arrangement is stored.

  • remember_layout (bool) – Restore and save the arrangement.

Returns:

The shell, ready for start().

Return type:

plesty.lib.ui.qt.shell.Shell

plesty.lib.ui.qt.app.run(panels: Sequence[plesty.lib.ui.panel.Panel], *, title: str = 'PLESTY', theme: plesty.lib.ui.theme.Theme | None = None, interval_ms: int = 500, layout_file: str | pathlib.Path | None = None, remember_layout: bool = True) int

Open a shell on panels and run it until the window is closed.

Parameters:
  • panels (Sequence[plesty.lib.ui.panel.Panel]) – Panels to add, in the order they should be docked.

  • title (str) – Window title and layout key.

  • theme (Optional[plesty.lib.ui.theme.Theme]) – Palette; None loads the packaged PLESTY theme.

  • interval_ms (int) – Panel refresh interval in milliseconds.

  • layout_file (Optional[str | pathlib.Path]) – Where the arrangement is stored.

  • remember_layout (bool) – Restore and save the arrangement.

Returns:

The Qt exit code.

Return type:

int