uv build local project dev

This commit is contained in:
2025-09-06 15:43:58 +02:00
parent 2929064f4d
commit 6902f07161
6 changed files with 30 additions and 17 deletions

View File

@@ -60,11 +60,13 @@ class AgilitySphereGraphicsItem(SphereGraphicsItem):
def __init__(self, x_pos: int, y_pos: int) -> None:
super().__init__(x_pos, y_pos, Qt.GlobalColor.darkYellow)
class EmptySphereGraphicsItem(SphereGraphicsItem):
def __init__(self, x_pos: int, y_pos: int) -> None:
self.SPHERE_WIDTH = 20
super().__init__(x_pos, y_pos, Qt.GlobalColor.black)
@staticmethod
def random_sphere_factory(x_pos: int, y_pos: int) -> SphereGraphicsItem:
rand = random.random()
@@ -78,6 +80,7 @@ def random_sphere_factory(x_pos: int, y_pos: int) -> SphereGraphicsItem:
obj = EmptySphereGraphicsItem(x_pos, y_pos)
return obj
class ArcGraphicsItem(QGraphicsItem):
"""Circle arc."""
@@ -111,7 +114,7 @@ class ArcGraphicsItem(QGraphicsItem):
# must a more elegant way but it works
if angle_end == 0:
angle_end = 360
self.draw_angle_end = int(abs(angle_end-angle_start) * 16)
self.draw_angle_end = int(abs(angle_end - angle_start) * 16)
logging.debug(
"arc from %s:%s of %s from %s° to %s°",
self.x_pos,

View File

@@ -112,8 +112,8 @@ class LargeUltimaPattern(Pattern):
y_pos=self.center_y,
width=self.SPACE_BETWEEN_SPHERE * 2,
angle_start=(i * 360 / sphere_on_circle) % 360,
#angle_end=((i + 1) * 360 / sphere_on_circle) % 360,
angle_end=(360 / sphere_on_circle ),
# angle_end=((i + 1) * 360 / sphere_on_circle) % 360,
angle_end=(360 / sphere_on_circle),
parent=self,
)
)

View File

@@ -1,9 +1,5 @@
import logging
import sys
from PySide6.QtGui import QPainter
from PySide6.QtWidgets import (
QApplication,
QGraphicsScene,
QGraphicsView,
QHBoxLayout,
@@ -34,12 +30,3 @@ class Window(QWidget):
self.setLayout(vbox)
self.show()
logging.basicConfig(
level=logging.DEBUG,
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
)
app = QApplication(sys.argv)
w = Window()
app.exec()