daplis_rtp.gui.main_window module
The window: five tabs, a menu bar, and the theme wired to both.
The old main window was a pyuic file that nobody could edit by hand
without losing the edit on the next export, and it carried a menu bar
that was built, shown, and left empty. Here the menu bar earns its
place - it is where the theme is chosen - and the window opens at a
deliberate size instead of at whatever minimum the tallest tab happened
to impose.
- class daplis_rtp.gui.main_window.MainWindow(parent=None)[source]
Bases:
QMainWindowThe application window.
- closeEvent(event)[source]
Stop what the tabs left running, then close.
This used to call
QApplication.quit(). Run from a terminal that made no difference - closing the last window ends the event loop anyway - but in an interpreter that outlives the call it tore down the QApplication the session was still holding, and the next run crashed the kernel.
- daplis_rtp.gui.main_window.quiesce(tab)[source]
Stop whatever one tab left running.
Everything here outlives the widget that started it unless it is stopped by hand, and each one is fatal in its own way: a QTimer fires into a deleted object, and a QThread destroyed while still running aborts the process outright.
- daplis_rtp.gui.main_window.write_plotted_data(path, data)[source]
Write one tab’s plotted numbers to
path.CSV or
.npz, by extension. The CSV carries the tab’s notes as#comments above the header - whichnumpy.loadtxtandpandas.read_csvboth skip by default - so that a file found on a disk six months later can still say which board, which firmware and which settings it came from. A plot whose provenance has to be remembered is a plot nobody trusts.