began work on code editor
parent
33e42e411c
commit
b7018e1a73
|
@ -56,6 +56,19 @@ class Editor(Window):
|
||||||
def __init__(self, size=(640, 480)):
|
def __init__(self, size=(640, 480)):
|
||||||
super().__init__(size, "Editor")
|
super().__init__(size, "Editor")
|
||||||
|
|
||||||
|
#Text Editor
|
||||||
|
self.text_edit = QtWidgets.QPlainTextEdit(self)
|
||||||
|
self.text_edit.setFrameStyle(QtWidgets.QFrame.NoFrame)
|
||||||
|
self.set_size(size[1], size[0])
|
||||||
|
#layout
|
||||||
|
layout = QtWidgets.QHBoxLayout()
|
||||||
|
layout.addChildWidget(self.text_edit)
|
||||||
|
|
||||||
|
self.setLayout(layout)
|
||||||
|
|
||||||
|
def set_size(self, size_x, size_y):
|
||||||
|
self.text_edit.resize(size_x, size_y)
|
||||||
|
|
||||||
|
|
||||||
class Message(QtWidgets.QMessageBox):
|
class Message(QtWidgets.QMessageBox):
|
||||||
def __init__(self, title, text):
|
def __init__(self, title, text):
|
||||||
|
|
6
main.py
6
main.py
|
@ -28,12 +28,12 @@ configuration = Config(configuration_file_path, default_configuration)
|
||||||
|
|
||||||
#Commented out so that I can work on the dockable windows
|
#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 = gui_handler.Editor((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.update_menus(gui_helper.menu_structure)
|
main_window.update_menus(gui_helper.menu_structure)
|
||||||
main_window.show()
|
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