aboutsummaryrefslogtreecommitdiff
path: root/gui/widgets/checkbox.py
blob: d8e32f16b05c21e4f0908664efca7f30b95c6d8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
from PyQt5.QtWidgets import QCheckBox


class CheckBox(QCheckBox):
    def __init__(self):
        super(QCheckBox, self).__init__()

    def get_value(self, ql_type):
        return ql_type(self.isChecked())

    def on_change(self, change_event_function):
        self.stateChanged.connect(lambda: change_event_function(self))