From db3d4ac60c48743713744e0937767a91e5d7baf1 Mon Sep 17 00:00:00 2001 From: Simon Renblad Date: Thu, 18 Apr 2024 10:30:13 +0800 Subject: [PATCH] moninj: add uid fields to handlers, widgets --- artiq/dashboard/moninj.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/artiq/dashboard/moninj.py b/artiq/dashboard/moninj.py index db8bb78b7..9674ddb98 100644 --- a/artiq/dashboard/moninj.py +++ b/artiq/dashboard/moninj.py @@ -34,6 +34,8 @@ class _TTLWidget(QtWidgets.QFrame): self.setFrameShape(QtWidgets.QFrame.Box) self.setFrameShadow(QtWidgets.QFrame.Raised) + self.uid = title + grid = QtWidgets.QGridLayout() grid.setContentsMargins(2, 2, 2, 2) grid.setHorizontalSpacing(2) @@ -112,6 +114,7 @@ class _TTLHandler: self.force_out = force_out self.set_mode = dm.ttl_set_mode self.title = title + self.uid = title self.cur_level = False self.cur_oe = False self.cur_override = False @@ -165,6 +168,8 @@ class _DDSWidget(QtWidgets.QFrame): def __init__(self, title, is_urukul): QtWidgets.QFrame.__init__(self) + self.uid = title + self.setFrameShape(QtWidgets.QFrame.Box) self.setFrameShadow(QtWidgets.QFrame.Raised) @@ -282,6 +287,7 @@ class _DDSHandler: ref_clk, cpld=None, pll=1, clk_div=0): self.dm = dm self.title = title + self.uid = title self.bus_channel = bus_channel self.channel = channel self.cur_frequency = 0 @@ -351,6 +357,8 @@ class _DACWidget(QtWidgets.QFrame): def __init__(self, channel, title): QtWidgets.QFrame.__init__(self) + self.uid = (title, channel) + self.setFrameShape(QtWidgets.QFrame.Box) self.setFrameShadow(QtWidgets.QFrame.Raised) @@ -378,6 +386,7 @@ class _DACHandler: self.spi_channel = spi_channel self.channel = channel self.title = title + self.uid = (title, channel) def create_widget(self): self.widget = _DACWidget(self.channel, self.title)