Skip to content

BarSet

Qt Base Class: QBarSet

Signature: QBarSet(self, label: str, parent: Optional[PySide6.QtCore.QObject] = None) -> None

Base classes

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

⋔ Inheritance diagram

graph TD
  1473367640032["charts.BarSet"]
  1473299815024["core.ObjectMixin"]
  140713234304496["builtins.object"]
  1473367610752["QtCharts.QBarSet"]
  1473288842240["QtCore.QObject"]
  1473291690208["Shiboken.Object"]
  1473299815024 --> 1473367640032
  140713234304496 --> 1473299815024
  1473367610752 --> 1473367640032
  1473288842240 --> 1473367610752
  1473291690208 --> 1473288842240
  140713234304496 --> 1473291690208

🛈 DocStrings

Bases: ObjectMixin, QBarSet

Source code in prettyqt\charts\barset.py
class BarSet(core.ObjectMixin, QtCharts.QBarSet):
    def __delitem__(self, index: int):
        """Delete bar at given index."""
        if not (0 <= index < self.count()):
            raise KeyError(index)
        self.remove(index)

    def __getitem__(self, index: int) -> float:
        """Get bar from given index."""
        if not (0 <= index < self.count()):
            raise KeyError(index)
        return self.at(index)

    def __setitem__(self, index: int, value: float):
        """Set bar at given index to value."""
        if not (0 <= index < self.count()):
            raise KeyError(index)
        self.replace(index, value)

    def __repr__(self):
        return get_repr(self, self.label())

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

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

__delitem__(index: int)

Delete bar at given index.

Source code in prettyqt\charts\barset.py
def __delitem__(self, index: int):
    """Delete bar at given index."""
    if not (0 <= index < self.count()):
        raise KeyError(index)
    self.remove(index)

__getitem__(index: int) -> float

Get bar from given index.

Source code in prettyqt\charts\barset.py
def __getitem__(self, index: int) -> float:
    """Get bar from given index."""
    if not (0 <= index < self.count()):
        raise KeyError(index)
    return self.at(index)

__setitem__(index: int, value: float)

Set bar at given index to value.

Source code in prettyqt\charts\barset.py
def __setitem__(self, index: int, value: float):
    """Set bar at given index to value."""
    if not (0 <= index < self.count()):
        raise KeyError(index)
    self.replace(index, value)

⌗ Property table

Qt Property Type Doc
objectName QString
label QString
pen QPen
brush QBrush
labelBrush QBrush
labelFont QFont
color QColor
borderColor QColor
labelColor QColor