| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- """
- DuDONG Application Entry Point
- Main entry point for the DuDONG Grading System application.
- Initializes the Qt application and displays the main window.
- """
- import sys
- from PyQt5.QtWidgets import QApplication
- from PyQt5.QtGui import QIcon
- from pathlib import Path
- from ui.main_window import DuDONGMainWindow
- def main():
- """
- Main application entry point.
-
- Initializes QApplication, creates and shows the main window,
- and starts the event loop.
- """
- # Create Qt application
- app = QApplication(sys.argv)
-
- # Set application metadata
- app.setApplicationName("DuDONG")
- app.setOrganizationName("AIDurian")
- app.setOrganizationDomain("aidurian.org")
-
- # Set application icon (if exists)
- icon_path = Path(__file__).parent / "assets" / "logos" / "durian.png"
- if icon_path.exists():
- app.setWindowIcon(QIcon(str(icon_path)))
-
- # Set application-wide style
- app.setStyleSheet("""
- QApplication {
- font-family: Arial, sans-serif;
- }
- """)
-
- # Create and show main window
- print("=" * 80)
- print("DuDONG Grading System")
- print("=" * 80)
- print("Initializing application...")
-
- window = DuDONGMainWindow()
- window.show()
-
- print("Application started successfully!")
- print("=" * 80)
-
- # Start event loop
- sys.exit(app.exec_())
- if __name__ == "__main__":
- main()
|