multicheck
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)
Classes:
| Name | Description |
|---|---|
MultiCheckWidget |
Qt Widget to show multiple checkboxes for a sequence of numbers. |
MultiCheckWidget
¶
Bases: QGroupBox
Qt Widget to show multiple checkboxes for a sequence of numbers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
count
|
int
|
The number of checkboxes to show. |
required |
title
|
Optional[str]
|
Display title for group of checkboxes. |
''
|
selected
|
Optional[List]
|
List of checkbox numbers to initially check. |
None
|
default
|
Optional[bool]
|
Whether to default boxes as checked. |
False
|
Methods:
| Name | Description |
|---|---|
boundingRect |
Method required by Qt. |
getSelected |
Method to get list of the checked checkboxes. |
paint |
Method required by Qt. |
setSelected |
Method to set some checkboxes as checked. |
Source code in sleap/gui/widgets/multicheck.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | |
boundingRect()
¶
Method required by Qt.
Source code in sleap/gui/widgets/multicheck.py
95 96 97 | |
getSelected()
¶
Method to get list of the checked checkboxes.
Returns:
| Type | Description |
|---|---|
list
|
list of checked checkboxes |
Source code in sleap/gui/widgets/multicheck.py
68 69 70 71 72 73 74 75 76 77 78 | |
paint(painter, option, widget=None)
¶
Method required by Qt.
Source code in sleap/gui/widgets/multicheck.py
99 100 101 | |
setSelected(selected)
¶
Method to set some checkboxes as checked.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
selected
|
list
|
List of checkboxes to check. |
required |
Returns:
| Type | Description |
|---|---|
|
None |
Source code in sleap/gui/widgets/multicheck.py
80 81 82 83 84 85 86 87 88 89 90 91 92 93 | |