aboutsummaryrefslogtreecommitdiff
path: root/gui/widgets/checkbox.py
diff options
context:
space:
mode:
authorBicker <bickerkards@tuta.io>2019-05-22 17:45:37 +0200
committerBicker <bickerkards@tuta.io>2019-05-22 17:45:37 +0200
commit25314fd2aed81aa5281bc3d93dbcc7919368ebe1 (patch)
tree1995521ee652e419926de5fced0f2e3b655e70fb /gui/widgets/checkbox.py
Initial commitHEADmaster
Diffstat (limited to 'gui/widgets/checkbox.py')
-rw-r--r--gui/widgets/checkbox.py12
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))