From b0b8b9b57bc188745f7b6e4a7b65c3a916a0a320 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20H=C3=B6gstedt?= <marin.hogstedt@hotmail.com>
Date: Tue, 11 Jun 2024 12:45:08 +0200
Subject: [PATCH] fixed comments

---
 src/simudator/gui/gui.py      |  5 ++---
 src/simudator/gui/pipeline.py | 16 ++++++++++------
 2 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/src/simudator/gui/gui.py b/src/simudator/gui/gui.py
index 53fc5e1..a036534 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 8673cd0..75ad99e 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)
 
-- 
GitLab