Source code for xraylabtool.gui.protocols
from typing import Any, Literal, Protocol
[docs]
class ThemeProtocol(Protocol):
"""Interface for the Theme Manager."""
[docs]
def set_theme(self, mode: Literal["light", "dark"]) -> None:
"""Switch the application theme."""
...
[docs]
def get_theme(self) -> Literal["light", "dark"]:
"""Get the current active theme."""
...
[docs]
def toggle_theme(self) -> None:
"""Toggle between light and dark modes."""
...
[docs]
def apply(self, app_instance: Any) -> None:
"""Apply the current theme stylesheet to the QApplication."""
...
[docs]
class PlotThemeProtocol(Protocol):
"""Interface for Plot Theme Integration."""