use logging and cleanup
Some checks failed
CI/CD / build (push) Successful in 9m25s
CI/CD / wol (push) Has been cancelled

This commit is contained in:
2025-08-18 21:30:26 +02:00
parent 9c6239028d
commit 6a63ff5d0b
5 changed files with 23 additions and 122 deletions

View File

@@ -1,3 +1,5 @@
import logging
from PySide6.QtCore import QRectF, Qt
from PySide6.QtGui import QBrush, QPainter, QPen
from PySide6.QtWidgets import (
@@ -28,10 +30,8 @@ class SphereGraphicsItem(QGraphicsEllipseItem):
)
self.x_pos = x_pos - self.SPHERE_WIDTH / 2
self.y_pos = y_pos - self.SPHERE_WIDTH / 2
print(f"sphere at {self.x_pos}:{self.y_pos}")
logging.debug(f"sphere at {self.x_pos}:{self.y_pos}")
# self.setPos(self.x_pos - self.SPHERE_WIDTH/2, self.y_pos - self.SPHERE_WIDTH/2)
# super().moveBy(x_pos - center.x(), y_pos - center.y())
brush = QBrush(Qt.GlobalColor.darkBlue)
self.setBrush(brush)
pen = QPen(Qt.GlobalColor.blue)
@@ -74,8 +74,13 @@ class ArcGraphicsItem(QGraphicsItem):
self.angle_end = angle_end
self.draw_angle_start = int(angle_start / 16)
self.draw_angle_end = int(angle_end * 16)
print(
f"arc from {self.x_pos}:{self.y_pos} of {self.width} {self.angle_start}° {self.angle_end}°"
logging.debug(
"arc from %s:%s of %s from %s° to %s°",
self.x_pos,
self.y_pos,
self.width,
self.angle_start,
self.angle_end,
)
def paint(
@@ -107,7 +112,7 @@ class LineGraphicsItem(QGraphicsItem):
parent: QGraphicsItem | None = ...,
) -> None:
super().__init__(parent)
print(f"line from {begin_x}:{begin_y} to {end_x}:{end_y}")
logging.debug(f"line from {begin_x}:{begin_y} to {end_x}:{end_y}")
self.begin_x = begin_x
self.begin_y = begin_y
self.end_x = end_x