GUI¶
GUI entry for XRayLabTool.
This package provides a lightweight Qt-based desktop interface for running single-material and multi-material X-ray optical property calculations and plotting results using PyQtGraph.
Main Window¶
- class xraylabtool.gui.main_window.Toast(parent)[source]¶
Bases:
QLabelLightweight, non-blocking toast overlay.
- Parameters:
parent (QWidget)
- staticMetaObject = PySide6.QtCore.QMetaObject("Toast" inherits "QLabel": )¶
Services¶
Helper utilities for the GUI layer.
- class xraylabtool.gui.services.EnergyConfig(start_kev=8.0, end_kev=12.0, points=50, logspace=False)[source]¶
Bases:
object
- xraylabtool.gui.services.compute_single(formula, density, energy_cfg)[source]¶
- Parameters:
formula (str)
density (float)
energy_cfg (EnergyConfig)
Theme Manager¶
- class xraylabtool.gui.theme_manager.ThemeManager(app)[source]¶
Bases:
QObjectManages application theme state and persistence.
- Parameters:
app (QApplication)
- theme_changed¶
- property current_palette: ColorPalette¶
Get the active ColorPalette object.
- apply(app_instance)[source]¶
Apply current theme to application and global resources.
- Return type:
- Parameters:
app_instance (QApplication)
- staticMetaObject = PySide6.QtCore.QMetaObject("ThemeManager" inherits "QObject": Methods: #4 type=Signal, signature=theme_changed(QString), parameters=QString )¶
Workers¶
Threaded workers for GUI calculations.
- class xraylabtool.gui.workers.WorkerSignals[source]¶
Bases:
QObject- finished¶
- error¶
- progress¶
- staticMetaObject = PySide6.QtCore.QMetaObject("WorkerSignals" inherits "QObject": Methods: #4 type=Signal, signature=finished(PyObject), parameters=PyObject #5 type=Signal, signature=error(QString), parameters=QString #6 type=Signal, signature=progress(int), parameters=int )¶
Protocols¶
- class xraylabtool.gui.protocols.ThemeProtocol(*args, **kwargs)[source]¶
Bases:
ProtocolInterface for the Theme Manager.
- __init__(*args, **kwargs)¶
Logging Filters¶
- xraylabtool.gui.logging_filters.suppress_qt_noise()[source]¶
Filter noisy Qt offscreen stderr lines (e.g., propagateSizeHints).
Keeps other stderr intact so real warnings still surface.
Widgets¶
Custom widgets for the XRayLabTool GUI.
- xraylabtool.gui.widgets.current_palette()[source]¶
Detect the active palette by checking the application background color.
- Return type:
ColorPalette