Files
sphere-grid/grid/ui/window.py
Alexandre RIO 4f9a4db759
Some checks failed
CI/CD / wol (push) Successful in 0s
CI/CD / build (push) Failing after 12s
connect patterns with single link
2025-09-12 23:04:10 +02:00

34 lines
795 B
Python

from PySide6.QtGui import QPainter
from PySide6.QtWidgets import (
QGraphicsScene,
QGraphicsView,
QHBoxLayout,
QWidget,
)
from grid.ui.pattern import LargeUltimaPattern, SmallZPattern
class Window(QWidget):
def __init__(self):
super().__init__()
self.setWindowTitle("sphere grid")
self.setGeometry(0, 0, 800, 600)
self.scene = QGraphicsScene(0, 0, 400, 400)
pp1 = LargeUltimaPattern(0, 0)
pp2 = SmallZPattern(351, 0)
pp1.connect(pp2)
self.scene.addItem(pp1)
self.scene.addItem(pp2)
view = QGraphicsView(self.scene)
view.setRenderHint(QPainter.RenderHint.Antialiasing)
vbox = QHBoxLayout(self)
vbox.addWidget(view)
self.setLayout(vbox)
self.show()