File size: 795 Bytes
128f42e fe2e16c 79de47c fe2e16c 128f42e 79de47c fe2e16c 128f42e 79de47c 128f42e fe2e16c 79de47c 128f42e 79de47c 128f42e 79de47c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
#!/usr/bin/env python3
"""
Entry point for Image Postprocess GUI (camera simulator).
Handles the import check for image_postprocess and launches the MainWindow.
"""
import sys
from pathlib import Path
from PyQt5.QtWidgets import QApplication, QMessageBox
from theme import apply_dark_palette
try:
from image_postprocess import process_image
except Exception as e:
IMPORT_ERROR = str(e)
else:
IMPORT_ERROR = None
from main_window import MainWindow
def main():
app = QApplication([])
apply_dark_palette(app)
if IMPORT_ERROR:
QMessageBox.critical(None, "Import error",
"Could not import image_postprocess module:\n" + IMPORT_ERROR)
w = MainWindow()
w.show()
sys.exit(app.exec_())
if __name__ == '__main__':
main()
|