diff options
Diffstat (limited to 'gui/widgets/checkbox.py')
| -rw-r--r-- | gui/widgets/checkbox.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gui/widgets/checkbox.py b/gui/widgets/checkbox.py new file mode 100644 index 0000000..d8e32f1 --- /dev/null +++ b/gui/widgets/checkbox.py @@ -0,0 +1,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)) |