plesty.server.view.app
Open the console: Qt application, plesty-lib theme, our stylesheet, the window.
Attributes
Functions
|
The first of candidates the host has, else fallback — quoted for QSS. |
|
The console stylesheet: |
|
The PLESTY mark ( |
|
The running Qt application, created, themed and branded when there is none. |
|
A themed main window on bench (the application must exist). |
|
Open the console on bench and run until the window closes; returns the exit code. |
|
Module Contents
- plesty.server.view.app.UI_FONTS = ('Inter', 'SF Pro Text', 'Segoe UI', 'Helvetica Neue', 'Arial')
- plesty.server.view.app.MONO_FONTS = ('SF Mono', 'Menlo', 'Consolas', 'DejaVu Sans Mono', 'Courier New')
- plesty.server.view.app.pick_font(candidates: tuple[str, Ellipsis], fallback: str) str
The first of candidates the host has, else fallback — quoted for QSS.
Asked rather than listed: Qt warns at start-up for every stylesheet family that is missing on the host, and the answer differs per bench.
- Parameters:
candidates (tuple[str, Ellipsis])
fallback (str)
- Return type:
str
- plesty.server.view.app.stylesheet(theme: plesty.lib.ui.theme.Theme | None = None) str
The console stylesheet:
assets/console.qsswith the palette and fonts substituted.- Parameters:
theme (plesty.lib.ui.theme.Theme | None)
- Return type:
str
- plesty.server.view.app.mark_icon() PySide6.QtGui.QIcon
The PLESTY mark (
assets/plesty-mark.svg, the static version) as a window icon.- Return type:
PySide6.QtGui.QIcon
- plesty.server.view.app.application() PySide6.QtWidgets.QApplication
The running Qt application, created, themed and branded when there is none.
- Return type:
PySide6.QtWidgets.QApplication
- plesty.server.view.app.build_window(bench: plesty.server.presenter.Bench, title: str | None = None) plesty.server.view.window.MainWindow
A themed main window on bench (the application must exist).
- Parameters:
bench (plesty.server.presenter.Bench)
title (str | None)
- Return type:
- plesty.server.view.app.run_gui(bench: plesty.server.presenter.Bench, title: str | None = None) int
Open the console on bench and run until the window closes; returns the exit code.
- Parameters:
bench (plesty.server.presenter.Bench)
title (str | None)
- Return type:
int
- plesty.server.view.app._version() str
- Return type:
str