forked from M-Labs/artiq
moninj: add uid fields to handlers, widgets
This commit is contained in:
parent
f6666d687e
commit
90dfc644a7
@ -34,6 +34,8 @@ class _TTLWidget(QtWidgets.QFrame):
|
|||||||
self.setFrameShape(QtWidgets.QFrame.Box)
|
self.setFrameShape(QtWidgets.QFrame.Box)
|
||||||
self.setFrameShadow(QtWidgets.QFrame.Raised)
|
self.setFrameShadow(QtWidgets.QFrame.Raised)
|
||||||
|
|
||||||
|
self.uid = title
|
||||||
|
|
||||||
grid = QtWidgets.QGridLayout()
|
grid = QtWidgets.QGridLayout()
|
||||||
grid.setContentsMargins(2, 2, 2, 2)
|
grid.setContentsMargins(2, 2, 2, 2)
|
||||||
grid.setHorizontalSpacing(2)
|
grid.setHorizontalSpacing(2)
|
||||||
@ -96,6 +98,7 @@ class _TTLHandler:
|
|||||||
self.force_out = force_out
|
self.force_out = force_out
|
||||||
self.set_mode = dm.ttl_set_mode
|
self.set_mode = dm.ttl_set_mode
|
||||||
self.title = title
|
self.title = title
|
||||||
|
self.uid = title
|
||||||
self.cur_level = False
|
self.cur_level = False
|
||||||
self.cur_oe = False
|
self.cur_oe = False
|
||||||
self.cur_override = False
|
self.cur_override = False
|
||||||
@ -149,6 +152,8 @@ class _DDSWidget(QtWidgets.QFrame):
|
|||||||
def __init__(self, title, is_urukul):
|
def __init__(self, title, is_urukul):
|
||||||
QtWidgets.QFrame.__init__(self)
|
QtWidgets.QFrame.__init__(self)
|
||||||
|
|
||||||
|
self.uid = title
|
||||||
|
|
||||||
self.setFrameShape(QtWidgets.QFrame.Box)
|
self.setFrameShape(QtWidgets.QFrame.Box)
|
||||||
self.setFrameShadow(QtWidgets.QFrame.Raised)
|
self.setFrameShadow(QtWidgets.QFrame.Raised)
|
||||||
|
|
||||||
@ -248,6 +253,7 @@ class _DDSHandler:
|
|||||||
ref_clk, cpld=None, pll=1, clk_div=0):
|
ref_clk, cpld=None, pll=1, clk_div=0):
|
||||||
self.dm = dm
|
self.dm = dm
|
||||||
self.title = title
|
self.title = title
|
||||||
|
self.uid = title
|
||||||
self.bus_channel = bus_channel
|
self.bus_channel = bus_channel
|
||||||
self.channel = channel
|
self.channel = channel
|
||||||
self.cur_frequency = 0
|
self.cur_frequency = 0
|
||||||
@ -317,6 +323,8 @@ class _DACWidget(QtWidgets.QFrame):
|
|||||||
def __init__(self, channel, title):
|
def __init__(self, channel, title):
|
||||||
QtWidgets.QFrame.__init__(self)
|
QtWidgets.QFrame.__init__(self)
|
||||||
|
|
||||||
|
self.uid = (title, channel)
|
||||||
|
|
||||||
self.setFrameShape(QtWidgets.QFrame.Box)
|
self.setFrameShape(QtWidgets.QFrame.Box)
|
||||||
self.setFrameShadow(QtWidgets.QFrame.Raised)
|
self.setFrameShadow(QtWidgets.QFrame.Raised)
|
||||||
|
|
||||||
@ -344,6 +352,7 @@ class _DACHandler:
|
|||||||
self.spi_channel = spi_channel
|
self.spi_channel = spi_channel
|
||||||
self.channel = channel
|
self.channel = channel
|
||||||
self.title = title
|
self.title = title
|
||||||
|
self.uid = (title, channel)
|
||||||
|
|
||||||
def create_widget(self):
|
def create_widget(self):
|
||||||
self.widget = _DACWidget(self.channel, self.title)
|
self.widget = _DACWidget(self.channel, self.title)
|
||||||
|
Loading…
Reference in New Issue
Block a user