From 798f893874b844303cb8d71a44e5ac02540d6ab5 Mon Sep 17 00:00:00 2001
From: Johannes Kung <johku144@student.liu.se>
Date: Fri, 5 Jul 2024 12:15:30 +0200
Subject: [PATCH] Docstrings for signal viewer properties

---
 src/simudator/gui/signal_viewer.py | 83 +++++++++++++++++++++++++++---
 1 file changed, 77 insertions(+), 6 deletions(-)

diff --git a/src/simudator/gui/signal_viewer.py b/src/simudator/gui/signal_viewer.py
index 3f57eff..34aeb20 100644
--- a/src/simudator/gui/signal_viewer.py
+++ b/src/simudator/gui/signal_viewer.py
@@ -99,33 +99,104 @@ class SignalViewer(QGraphicsWidget):
         return QRectF(0 - margin, 0 - margin, width + margin, height + margin)
 
     def outline_width(self) -> float:
+        """Return the outline pen width.
+
+        Returns
+        -------
+        float
+            Outline pen width.
+        """
         return self._outline_width
 
     def set_outline_width(self, width: float) -> None:
+        """Set the outline pen width.
+
+        Parameters
+        ----------
+        width : float
+            Outline pen width.
+
+        """
         self._outline_width = width
 
-    def outline(self) -> QColor:
+    def outline(self) -> QBrush:
+        """Return the outline brush used to create the outline pen.
+
+        Returns
+        -------
+        QBrush
+            Outline brush.
+        """
         return self._outline
 
-    def set_outline(self, color: QColor) -> None:
-        self._outline = color
+    def set_outline(self, brush: QBrush) -> None:
+        """Set the outline brush used to create the outline pen.
+
+        Parameters
+        ----------
+        brush : QBrush
+            Outline brush.
+        """
+        self._outline = brush
+
+    def background(self) -> QBrush:
+        """Return the bursh used for filling the background.
 
-    def background(self) -> QColor:
+        Returns
+        -------
+        QBrush
+            Background brush.
+        """
         return self._background
 
-    def set_background(self, color: QColor) -> None:
-        self._background = color
+    def set_background(self, brush: QBrush) -> None:
+        """Set the bursh used for filling the background.
+
+        Parameters
+        ----------
+        brush : QBrush
+            Background brush.
+        """
+        self._background = brush
 
     def text_color(self) -> QColor:
+        """Return the color used for text.
+
+        Returns
+        -------
+        QColor
+            Text color.
+        """
         return self._text_color
 
     def set_text_color(self, color: QColor) -> None:
+        """Set the color used for text.
+
+        Parameters
+        ----------
+        color : QColor
+            Text color.
+        """
         self._text_color = color
 
     def text_font(self) -> QFont:
+        """Return the font used for text.
+
+        Returns
+        -------
+        QFont
+            Text font.
+        """
         return self._text_font
 
     def set_text_font(self, font: QFont) -> None:
+        """Set the font used for text.
+
+        Parameters
+        ----------
+        font : QFont
+            Text font.
+        """
         self._text_font = font
 
     outline_width = Property(float, outline_width, set_outline_width)
-- 
GitLab