diff --git a/src/simudator/gui/signal_viewer.py b/src/simudator/gui/signal_viewer.py index 3f57eff836a5fb7a0235e4bfb0fd34775051ecbc..34aeb20e847fa34689781a710d0ccb6a242fabd1 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)