API: Shared Widgets¶
Cross-kit UI base classes and components.
hydra_suite.widgets.workers
¶
BaseWorker — standard QThread base class for all background tasks.
BaseWorker
¶
Bases: QThread
Base class for all background task workers.
Subclasses implement execute() only. run() is owned by this
class and guarantees:
- Unhandled exceptions in execute() emit error instead of
crashing the thread silently.
- Qt automatically emits the inherited QThread.finished signal
when run() returns, whether execution succeeded or failed.
Do not redefine finished in subclasses — it would shadow
Qt's mechanism and cause missed or double emissions.
Standard signals¶
progress(int) — 0–100 completion percentage status(str) — human-readable status update error(str) — error message; emitted only on exception finished() — inherited from QThread; emitted automatically by Qt when run() returns (success or failure)
hydra_suite.widgets.dialogs
¶
BaseDialog — standard QDialog base class for all kit dialogs.
BaseDialog
¶
Bases: QDialog
Base class for all kit dialogs.
Subclasses call add_content(widget) to insert their UI above the
button box. The button box is always created automatically in the
correct position.
Parameters¶
title:
Window title shown in the title bar.
parent:
Parent widget (passed to QDialog).
buttons:
QDialogButtonBox.StandardButtons flags. Defaults to
Ok | Cancel.
apply_dark_style:
Whether to apply the shared dark stylesheet. Default True.
add_content(widget)
¶
Insert widget above the button box.