sleap.gui.widgets.multicheck

Module for Qt Widget to show multiple checkboxes for selecting.

Example

>>> mc = MultiCheckWidget(count=5, selected=[0,1],title="My Items")
>>> mc.selectionChanged.connect(window.plot)
>>> window.layout.addWidget(mc)
class sleap.gui.widgets.multicheck.MultiCheckWidget(*args, count: int, title: Optional[str] = '', selected: Optional[List] = None, default: Optional[bool] = False, **kwargs)[source]

Qt Widget to show multiple checkboxes for a sequence of numbers.

Parameters
  • count – The number of checkboxes to show.

  • title – Display title for group of checkboxes.

  • selected – List of checkbox numbers to initially check.

  • default – Whether to default boxes as checked.

boundingRect() → PySide2.QtCore.QRectF[source]

Method required by Qt.

getSelected() → list[source]

Method to get list of the checked checkboxes.

Returns

list of checked checkboxes

paint(painter, option, widget=None)[source]

Method required by Qt.

setSelected(selected: list)[source]

Method to set some checkboxes as checked.

Parameters

selected – List of checkboxes to check.

Returns

None