Files
sphere-grid/grid/ui/window.py
Alexandre RIO f26bd7bf2e
All checks were successful
CI/CD / wol (push) Successful in 0s
CI/CD / build (push) Successful in 10m33s
small pattern and fix circle arc
2025-09-01 21:13:04 +02:00

46 lines
985 B
Python

import logging
import sys
from PySide6.QtGui import QPainter
from PySide6.QtWidgets import (
QApplication,
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(401, 0)
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()
logging.basicConfig(
level=logging.DEBUG,
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
)
app = QApplication(sys.argv)
w = Window()
app.exec()