Skip to content
Snippets Groups Projects
Commit 9d3c60b7 authored by Ewan Cook's avatar Ewan Cook
Browse files

refs #23097 flake8/pep8

parent 1e4f7805
No related branches found
No related tags found
No related merge requests found
......@@ -43,7 +43,7 @@ class ElementalAnalysisGui(QtGui.QMainWindow):
self.checkbox = CheckboxPresenter(self._checkbox_view, CheckboxModel())
for _, v in self.checkbox.view.checkbox_dict.iteritems():
v.on_checkbox_unchecked(lambda c: print("unchecked: {}".format(c.name)))
v.on_checkbox_checked(lambda c: print("checked: {}".format(c.name)))
v.on_checkbox_checked(lambda c: print("checked: {}".format(c.name)))
self.widget_list.addWidget(self.checkbox.view)
......
from functools import partial
from PyQt4 import QtCore, QtGui
class Checkbox(QtGui.QCheckBox):
checked = QtCore.pyqtSignal(object)
unchecked = QtCore.pyqtSignal(object)
......@@ -15,7 +14,7 @@ class Checkbox(QtGui.QCheckBox):
if state == 2:
self.checked.emit(self)
elif state == 1:
pass # partially checked; not implemented, future...?
pass # partially checked; not implemented, future...?
elif not state:
self.unchecked.emit(self)
......@@ -24,7 +23,7 @@ class Checkbox(QtGui.QCheckBox):
def on_checkbox_unchecked(self, slot):
self.unchecked.connect(slot)
def unreg_on_checkbox_checked(self, slot):
try:
self.checked.disconnect(slot)
......
......@@ -2,4 +2,3 @@ class CheckboxPresenter(object):
def __init__(self, view, model):
self.view = view
self.model = model
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment