diff --git a/gui_handler.py b/gui_handler.py index b14616d..fbb69de 100644 --- a/gui_handler.py +++ b/gui_handler.py @@ -1,5 +1,5 @@ +from email import message from PySide6 import QtWidgets -#import gui_helper import util app = QtWidgets.QApplication([]) @@ -52,6 +52,17 @@ class Window(QtWidgets.QMainWindow): menu_item = menu.addAction(entry) menu_item.triggered.connect(menu_dict[entry]) + +class Message(QtWidgets.QMessageBox): + def __init__(self, title, text): + super().__init__() + + self.setWindowTitle(title) + self.setText(text) + self.setStandardButtons(QtWidgets.QMessageBox.Ok) + self.exec() + + #TODO: This needs to run in a thread but Qt really doesn't want it to. There are two ways around this: # - create the QtWidgets.QApplication inside a thread and run all QT stuff inside that thread # - make a generic wrapper for window mainloop that will always run in the main thread while the actual main control flow of the program gets moved to another thread diff --git a/gui_helper.py b/gui_helper.py index 43a5885..b65fe4b 100644 --- a/gui_helper.py +++ b/gui_helper.py @@ -1,9 +1,18 @@ import util - +import gui_handler def not_implemented(): util.warn("Not implemented!") +def about_concorde(): + dialog = gui_handler.Message("About Concorde", + """ + Version: 0.0.1 + + Made by BodgeMaster and Shwoomple + """) + + # format: # "":{} -> menu or submenu # "":function -> menu entry @@ -60,6 +69,6 @@ menu_structure = { }, "Help": { "Manual...": not_implemented, - "About IDE...": not_implemented, + "About IDE...": about_concorde, } }