33 lines
760 B
Python
33 lines
760 B
Python
"""Application entry point for the PyQt-based laser-control GUI."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import os
|
|
import sys
|
|
|
|
from PyQt6.QtWidgets import QApplication
|
|
import pyqtgraph as pg
|
|
|
|
from .theme import apply_theme
|
|
from .window import MainWindow
|
|
|
|
|
|
def main() -> int:
|
|
"""Run the GUI event loop."""
|
|
os.environ.setdefault("PYQTGRAPH_QT_LIB", "PyQt6")
|
|
|
|
app = QApplication(sys.argv)
|
|
pg.setConfigOptions(antialias=True, background="#0f1720", foreground="#dce6f2")
|
|
apply_theme(app)
|
|
|
|
window = MainWindow(auto_connect=True)
|
|
screen = app.primaryScreen()
|
|
if screen is not None:
|
|
window.setGeometry(screen.availableGeometry())
|
|
window.show()
|
|
return app.exec()
|
|
|
|
|
|
if __name__ == "__main__":
|
|
raise SystemExit(main())
|