diff options
| author | Christian Kolset <christian.kolset@gmail.com> | 2026-04-22 12:21:28 -0600 |
|---|---|---|
| committer | Christian Kolset <christian.kolset@gmail.com> | 2026-04-22 12:21:28 -0600 |
| commit | 91101126e9d044adb8afa635cca1ab5d5a4c51a6 (patch) | |
| tree | 5e8a5de10751e82e76092e37760cc984346f7eb7 /ui/main_window.py | |
| parent | 38ba9706e43c24a9d882b9d0d627812e01a30744 (diff) | |
Fixed saving profile to include devices and their configuration
Diffstat (limited to 'ui/main_window.py')
| -rw-r--r-- | ui/main_window.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ui/main_window.py b/ui/main_window.py index 9df7ef7..d4bb203 100644 --- a/ui/main_window.py +++ b/ui/main_window.py @@ -92,6 +92,12 @@ class MainWindow(QMainWindow): self._log_btn.setEnabled(False); self._log_btn.clicked.connect(self._toggle_log) tb.addWidget(self._log_btn) + self._clear_btn = QPushButton("⌫ Clear") + self._clear_btn.setObjectName("toolbarSectionBtn") + self._clear_btn.setToolTip("Clear plot history") + self._clear_btn.clicked.connect(self._clear_history) + tb.addWidget(self._clear_btn) + tb.addWidget(_sep()) dev_btn = QPushButton("⊞ Devices") @@ -265,12 +271,15 @@ class MainWindow(QMainWindow): processor=self.processor, control_panel=self._ctrl, settings_ref=self._settings, + engine=self.engine, ) if plot_cfg: self._chart.apply_layout(plot_cfg) else: self._chart.refresh() # Refresh open windows + if self._win_devices: + self._win_devices.refresh() if self._win_plot: self._win_plot.refresh_channels() self._status.setText(f"Profile loaded: {profile.name}") @@ -309,6 +318,11 @@ class MainWindow(QMainWindow): self._log_btn.setEnabled(False); self._clock.stop() self._status.setText("Stopped") + def _clear_history(self): + self.engine.clear_history() + self._chart.refresh() + self._status.setText("History cleared.") + def _toggle_log(self, c: bool): if c: p = self.engine.start_logging( |
