39 lines
770 B
Python
39 lines
770 B
Python
"""
|
|
main.py — Linedance afspiller.
|
|
|
|
Start:
|
|
python main.py
|
|
"""
|
|
|
|
import sys
|
|
import os
|
|
|
|
sys.path.insert(0, os.path.dirname(__file__))
|
|
|
|
from PyQt6.QtWidgets import QApplication
|
|
from ui.main_window import MainWindow
|
|
from ui.themes import apply_theme
|
|
|
|
|
|
def main():
|
|
app = QApplication(sys.argv)
|
|
app.setApplicationName("LineDance Player")
|
|
app.setOrganizationName("LineDance")
|
|
|
|
# Indlæs sprog fra indstillinger
|
|
from ui.settings_dialog import load_settings
|
|
from translations import load_language
|
|
settings = load_settings()
|
|
load_language(settings.get("language", "da"))
|
|
|
|
apply_theme(app, dark=settings.get("dark_theme", True))
|
|
|
|
window = MainWindow()
|
|
window.show()
|
|
|
|
sys.exit(app.exec())
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|