Started work on editor class
parent
34176805d2
commit
33e42e411c
|
@ -3,12 +3,13 @@ import util
|
||||||
|
|
||||||
app = QtWidgets.QApplication([])
|
app = QtWidgets.QApplication([])
|
||||||
|
|
||||||
|
#TODO: Implement separate editor, terminal and main_window classes using Window as a parent
|
||||||
|
|
||||||
class Window(QtWidgets.QMainWindow):
|
class Window(QtWidgets.QMainWindow):
|
||||||
def __init__(self, size=(640, 480), title="Concorde"):
|
def __init__(self, size=(640, 480), title="Concorde"):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.setWindowTitle(title)
|
self.setWindowTitle(title)
|
||||||
self.resize(size[0], size[1])
|
self.resize(size[0], size[1])
|
||||||
self.show()
|
|
||||||
|
|
||||||
def __del__(self):
|
def __del__(self):
|
||||||
#TODO: whatever needs to be done here
|
#TODO: whatever needs to be done here
|
||||||
|
@ -51,6 +52,10 @@ class Window(QtWidgets.QMainWindow):
|
||||||
menu_item = menu.addAction(entry)
|
menu_item = menu.addAction(entry)
|
||||||
menu_item.triggered.connect(menu_dict[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):
|
class Message(QtWidgets.QMessageBox):
|
||||||
def __init__(self, title, text):
|
def __init__(self, title, text):
|
||||||
|
|
10
main.py
10
main.py
|
@ -26,12 +26,14 @@ configuration = Config(configuration_file_path, default_configuration)
|
||||||
# PROGRAM MAIN WINDOW
|
# 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_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.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: 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
|
#TODO: check if the GUI encountered an error in a toolkit agnostic way
|
||||||
|
|
Reference in New Issue