summaryrefslogtreecommitdiff
path: root/ui/windows
diff options
context:
space:
mode:
Diffstat (limited to 'ui/windows')
-rw-r--r--ui/windows/debug_window.py65
-rw-r--r--ui/windows/settings_window.py6
2 files changed, 3 insertions, 68 deletions
diff --git a/ui/windows/debug_window.py b/ui/windows/debug_window.py
deleted file mode 100644
index 0e891ed..0000000
--- a/ui/windows/debug_window.py
+++ /dev/null
@@ -1,65 +0,0 @@
-"""
-ui/windows/debug_window.py
-
-DEBUG window — developer-mode only.
-
-Minimal first pass: a live console showing everything the app has printed
-via core.debug_log (stdout/stderr tee), so debugging doesn't require a
-terminal. Not wired to any other diagnostics yet — extend as needed.
-"""
-
-from PyQt6.QtWidgets import (
- QWidget, QVBoxLayout, QHBoxLayout, QLabel, QPushButton,
- QTextEdit, QFrame,
-)
-from PyQt6.QtCore import Qt, pyqtSignal
-from PyQt6.QtGui import QFont, QCloseEvent
-
-from core.debug_log import get_broadcaster, get_history
-
-
-class DebugWindow(QWidget):
- closed = pyqtSignal()
-
- def __init__(self, parent=None):
- super().__init__(parent, Qt.WindowType.Window | Qt.WindowType.Tool)
- self.setWindowTitle("Debug")
- self.setMinimumSize(560, 420)
- self.resize(700, 500)
- self._build()
-
- broadcaster = get_broadcaster()
- if broadcaster is not None:
- broadcaster.line_written.connect(self._append)
-
- def _build(self):
- root = QVBoxLayout(self); root.setContentsMargins(0, 0, 0, 0); root.setSpacing(0)
-
- hdr = QWidget(); hdr.setObjectName("devWindowTitleBar"); hdr.setFixedHeight(44)
- hl = QHBoxLayout(hdr); hl.setContentsMargins(14, 0, 14, 0)
- title = QLabel("DEBUG"); title.setObjectName("devWindowTitle")
- hl.addWidget(title, 1)
- clear_btn = QPushButton("Clear"); clear_btn.setObjectName("configButton")
- clear_btn.clicked.connect(lambda: self._console.clear())
- hl.addWidget(clear_btn)
- root.addWidget(hdr)
-
- div = QFrame(); div.setFrameShape(QFrame.Shape.HLine)
- div.setObjectName("devWindowDivider"); root.addWidget(div)
-
- self._console = QTextEdit(); self._console.setObjectName("codeEditor")
- self._console.setReadOnly(True)
- mono = QFont("IBM Plex Mono, Consolas, Monospace")
- mono.setStyleHint(QFont.StyleHint.Monospace)
- self._console.setFont(mono)
- self._console.setPlainText(get_history())
- self._console.verticalScrollBar().setValue(self._console.verticalScrollBar().maximum())
- root.addWidget(self._console, 1)
-
- def _append(self, text: str):
- self._console.insertPlainText(text)
- sb = self._console.verticalScrollBar()
- sb.setValue(sb.maximum())
-
- def closeEvent(self, e: QCloseEvent):
- self.closed.emit(); e.accept()
diff --git a/ui/windows/settings_window.py b/ui/windows/settings_window.py
index 09b7a1a..a1d9de1 100644
--- a/ui/windows/settings_window.py
+++ b/ui/windows/settings_window.py
@@ -113,9 +113,9 @@ class SettingsWindow(QWidget):
self._dev_chk = QCheckBox()
self._dev_chk.setChecked(self.cfg["developer_mode"])
self._dev_chk.setToolTip(
- "Controls whether the Debug window and each device's Simulation\n"
- "Mode option are available, and enables verbose DEBUG output in\n"
- "the terminal. Off = real-hardware-only, no debug tools."
+ "Controls whether each device's Simulation Mode option is\n"
+ "available, and enables verbose DEBUG output in the terminal.\n"
+ "Off = real-hardware-only, no debug tools."
)
lay.addRow("Developer mode:", self._dev_chk)