Skip to content
Snippets Groups Projects
Commit 798f8938 authored by Johannes Kung's avatar Johannes Kung
Browse files

Docstrings for signal viewer properties

parent f7f7160b
No related branches found
No related tags found
1 merge request!44Fixed flags
Pipeline #133264 failed
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment