Started work on editor class

master
Milan Suman 2022-03-26 14:13:00 +05:30
parent 34176805d2
commit 33e42e411c
2 changed files with 12 additions and 5 deletions

View File

@ -3,12 +3,13 @@ import util
app = QtWidgets.QApplication([])
#TODO: Implement separate editor, terminal and main_window classes using Window as a parent
class Window(QtWidgets.QMainWindow):
def __init__(self, size=(640, 480), title="Concorde"):
super().__init__()
self.setWindowTitle(title)
self.resize(size[0], size[1])
self.show()
def __del__(self):
#TODO: whatever needs to be done here
@ -51,6 +52,10 @@ class Window(QtWidgets.QMainWindow):
menu_item = menu.addAction(entry)
menu_item.triggered.connect(menu_dict[entry])
class Editor(Window):
def __init__(self, size=(640, 480)):
super().__init__(size, "Editor")
class Message(QtWidgets.QMessageBox):
def __init__(self, title, text):

10
main.py
View File

@ -26,12 +26,14 @@ configuration = Config(configuration_file_path, default_configuration)
# PROGRAM MAIN WINDOW
################################################################################
main_window = gui_handler.Window()
#Commented out so that I can work on the dockable windows
"""
main_window = gui_handler.Window((configuration.get_configuration_value("window size")["x"], configuration.get_configuration_value("window size")["y"]))
main_window.set_title("Concorde IDE")
main_window.set_size(configuration.get_configuration_value("window size")["x"], configuration.get_configuration_value("window size")["y"])
main_window.update_menus(gui_helper.menu_structure)
main_window.show()
"""
#TODO: get resolution of main window on exit and save it back to the configuration
#TODO: check if the GUI encountered an error in a toolkit agnostic way