add yellow sphere, fix CI
All checks were successful
CI/CD / wol (push) Successful in 0s
CI/CD / build (push) Successful in 9m25s

This commit is contained in:
2025-08-23 15:21:06 +02:00
parent a563a01ca3
commit 50b783c1df
3 changed files with 33 additions and 9 deletions

View File

@@ -15,7 +15,9 @@ class SphereGraphicsItem(QGraphicsEllipseItem):
SPHERE_WIDTH = 30
def __init__(self, x_pos: int, y_pos: int, color: Qt.GlobalColor = Qt.GlobalColor.darkBlue) -> None:
def __init__(
self, x_pos: int, y_pos: int, color: Qt.GlobalColor = Qt.GlobalColor.darkBlue
) -> None:
"""Create a sphere
Args:
@@ -34,24 +36,30 @@ class SphereGraphicsItem(QGraphicsEllipseItem):
brush = QBrush(color)
self.setBrush(brush)
pen = QPen(Qt.GlobalColor.blue)
pen.setWidth(3)
pen = QPen(Qt.GlobalColor.darkBlue)
pen.setWidth(2)
self.setPen(pen)
self.show()
def boundingRect(self) -> QRectF:
return QRectF(self.x_pos, self.y_pos, self.SPHERE_WIDTH, self.SPHERE_WIDTH)
class HPSphereGraphicsItem(SphereGraphicsItem):
class HPSphereGraphicsItem(SphereGraphicsItem):
def __init__(self, x_pos: int, y_pos: int) -> None:
super().__init__(x_pos, y_pos, Qt.GlobalColor.darkGreen)
class StrenghSphereGraphicsItem(SphereGraphicsItem):
class StrenghSphereGraphicsItem(SphereGraphicsItem):
def __init__(self, x_pos: int, y_pos: int) -> None:
super().__init__(x_pos, y_pos, Qt.GlobalColor.darkRed)
class AgilitySphereGraphicsItem(SphereGraphicsItem):
def __init__(self, x_pos: int, y_pos: int) -> None:
super().__init__(x_pos, y_pos, Qt.GlobalColor.darkYellow)
class ArcGraphicsItem(QGraphicsItem):
"""Circle arc."""