Skip to content

BoxSet

Qt Base Class: QBoxSet

Signature: QBoxSet(self, label: str = '', parent: Optional[PySide6.QtCore.QObject] = None) -> None QBoxSet(self, le: float, lq: float, m: float, uq: float, ue: float, label: str = '', parent: Optional[PySide6.QtCore.QObject] = None) -> None

Base classes

Name Children Inherits
ObjectMixin
prettyqt.core.object
QBoxSet
PySide6.QtCharts
QBoxSet(self, label: str \= '', parent: Optional[PySide6.QtCore.QObject] \= None) -> None

⋔ Inheritance diagram

graph TD
  1473367641008["charts.BoxSet"]
  1473299815024["core.ObjectMixin"]
  140713234304496["builtins.object"]
  1473367625392["QtCharts.QBoxSet"]
  1473288842240["QtCore.QObject"]
  1473291690208["Shiboken.Object"]
  1473299815024 --> 1473367641008
  140713234304496 --> 1473299815024
  1473367625392 --> 1473367641008
  1473288842240 --> 1473367625392
  1473291690208 --> 1473288842240
  140713234304496 --> 1473291690208

🛈 DocStrings

Bases: ObjectMixin, QBoxSet

Source code in prettyqt\charts\boxset.py
class BoxSet(core.ObjectMixin, QtCharts.QBoxSet):
    def __repr__(self):
        return get_repr(
            self,
            self["lower_extreme"],
            self["lower_quartile"],
            self["median"],
            self["upper_quartile"],
            self["upper_extreme"],
            self.label(),
        )

    def __getitem__(
        self, index: int | ValuePositionStr | QtCharts.QBoxSet.ValuePositions
    ) -> float:
        """Returns the value of the box-and-whiskers item specified by index."""
        if type(index) is not int:
            index = VALUE_POSITION.get_enum_value(index).value
        if not (0 <= index <= 4):
            raise KeyError(index)
        return self.at(index)

    def __setitem__(
        self, index: int | ValuePositionStr | QtCharts.QBoxSet.ValuePositions, value: int
    ):
        """Sets the value specified by value in the position specified by index."""
        if type(index) is not int:
            index = VALUE_POSITION.get_enum_value(index).value
        if not (0 <= index <= 4):
            raise KeyError(index)
        self.setValue(index, value)

    def get_pen(self) -> gui.Pen:
        return gui.Pen(self.pen())

    def get_brush(self) -> gui.Brush:
        return gui.Brush(self.brush())

__getitem__(index: int | ValuePositionStr | QtCharts.QBoxSet.ValuePositions) -> float

Returns the value of the box-and-whiskers item specified by index.

Source code in prettyqt\charts\boxset.py
def __getitem__(
    self, index: int | ValuePositionStr | QtCharts.QBoxSet.ValuePositions
) -> float:
    """Returns the value of the box-and-whiskers item specified by index."""
    if type(index) is not int:
        index = VALUE_POSITION.get_enum_value(index).value
    if not (0 <= index <= 4):
        raise KeyError(index)
    return self.at(index)

__setitem__(index: int | ValuePositionStr | QtCharts.QBoxSet.ValuePositions, value: int)

Sets the value specified by value in the position specified by index.

Source code in prettyqt\charts\boxset.py
def __setitem__(
    self, index: int | ValuePositionStr | QtCharts.QBoxSet.ValuePositions, value: int
):
    """Sets the value specified by value in the position specified by index."""
    if type(index) is not int:
        index = VALUE_POSITION.get_enum_value(index).value
    if not (0 <= index <= 4):
        raise KeyError(index)
    self.setValue(index, value)

⌗ Property table

Qt Property Type Doc
objectName QString
pen QPen
brush QBrush