mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-29 13:13:34 +08:00
custom_applet: change constructor, data_changed signatures
This commit is contained in:
parent
0e8aa33979
commit
bafb85a274
@ -4,13 +4,13 @@ from artiq.applets.simple import SimpleApplet
|
||||
|
||||
|
||||
class DemoWidget(QtWidgets.QLabel):
|
||||
def __init__(self, args):
|
||||
def __init__(self, args, ctl):
|
||||
QtWidgets.QLabel.__init__(self)
|
||||
self.dataset_name = args.dataset
|
||||
|
||||
def data_changed(self, data, mods):
|
||||
def data_changed(self, value, metadata, persist, mods):
|
||||
try:
|
||||
n = str(data[self.dataset_name][1])
|
||||
n = str(value[self.dataset_name])
|
||||
except (KeyError, ValueError, TypeError):
|
||||
n = "---"
|
||||
n = "<font size=15>" + n + "</font>"
|
||||
|
Loading…
Reference in New Issue
Block a user