diff --git a/src/simudator/gui/gui.py b/src/simudator/gui/gui.py index 53fc5e1ec460cf4d07348e53fce8926b3ea1a9bf..a03653469d5b0b088ef001b42f447857c24e21b4 100644 --- a/src/simudator/gui/gui.py +++ b/src/simudator/gui/gui.py @@ -132,7 +132,8 @@ class GUI(QMainWindow): self.cpu_running = False self.pipeline = PipeLine() - self.pipeline.show() + # Hide pipeline for now since it is not implemented yet + # self.pipeline.show() # Set Style, THESE ARE TEST AND DONT WORK app = QApplication.instance() @@ -571,8 +572,6 @@ class GUI(QMainWindow): """ self.cpu.stop() - - # TODO: What is the difference between folderSaveDialog and folderLoadDialog? def folderSaveDialog(self) -> str: """ Opens a file explorer in a new window. Returns the absolute path to the selected file. diff --git a/src/simudator/gui/pipeline.py b/src/simudator/gui/pipeline.py index 8673cd08df146bf49e3bf7ccd1c91ab9cab3c178..75ad99e7ab647d1593e93cac8073ec8b57837283 100644 --- a/src/simudator/gui/pipeline.py +++ b/src/simudator/gui/pipeline.py @@ -12,6 +12,8 @@ class PipeLine(QTableWidget): def __init__(self): super().__init__() + # Values below are temporary test values + """ self.setRowCount(5) self.setColumnCount(5) self.instructions = ["Add", "Sub", "Mult", "Fetch", "Nop"] @@ -19,20 +21,22 @@ class PipeLine(QTableWidget): self.set_item(1, 1, self.instructions[1]) self.set_item(2, 2, self.instructions[2]) self.set_item(3, 3, self.instructions[3]) + """ + - def set_instruction(self, instructions: list[str]): + def set_instruction(self, instructions: list[str]) -> None: """Give the pipeline the current CPU instructions.""" self.instrucitons = instructions - def set_height(self, height: int): + def set_height(self, height: int) -> None: """Sets the height of the pipeline.""" self.setColumnCount(height) - def set_width(self, width: int): + def set_width(self, width: int) -> None: """Sets the width of the pipeline.""" self.setRowCount(width) - def set_row_labels(self, labels: list[str]): + def set_row_labels(self, labels: list[str]) -> None: """ Sets the lable for each row. Does not gurantee that number of labels match rows. @@ -44,7 +48,7 @@ class PipeLine(QTableWidget): """ raise NotImplemented - def set_col_labels(self, labels: list[str]): + def set_col_labels(self, labels: list[str]) -> None: """ Sets the lable for each col. Does not gurantee that number of labels match cols. @@ -54,7 +58,7 @@ class PipeLine(QTableWidget): """ raise NotImplemented - def set_item(self, row: int, col: int, text: str): + def set_item(self, row: int, col: int, text: str) -> None: """Sets the text at position col row to the given text.""" item = QTableWidgetItem(text)