Commit for Gitea

This commit is contained in:
DuOtto
2026-04-28 12:14:58 +02:00
parent 225ecc2e17
commit a12182baa2
116 changed files with 2630 additions and 381 deletions
+23
View File
@@ -0,0 +1,23 @@
from PySide6.QtCore import QObject, Signal, Slot
from PySide6.QtWidgets import QPlainTextEdit
import winsound
class UILogger(QObject):
append_line = Signal(str)
def __init__(self, widget: QPlainTextEdit):
super().__init__()
self.widget = widget
self.widget.setReadOnly(True)
self.widget.setMaximumBlockCount(2000)
self.append_line.connect(self._append)
@Slot(str)
def _append(self, text: str):
self.widget.appendPlainText(text)
def log(self, text:str):
self.append_line.emit(text)
winsound.PlaySound("SystemExclamation", winsound.SND_ALIAS | winsound.SND_ASYNC)