mirror of
https://github.com/bec-project/bec_widgets.git
synced 2026-03-10 02:37:59 +01:00
feat: emit the full bec message to slots
* some widgets will require metadata for their operation
This commit is contained in:
@@ -41,16 +41,18 @@ class BECScanPlot(pg.PlotWidget):
|
||||
if len(self.scan_curves) == 1:
|
||||
plot_item.setLabel("left", next(iter(self.scan_curves)))
|
||||
|
||||
@pyqtSlot()
|
||||
def clearData(self):
|
||||
@pyqtSlot("PyQt_PyObject")
|
||||
def clearData(self, _msg):
|
||||
for plot_curve in {**self.scan_curves, **self.dap_curves}.values():
|
||||
plot_curve.setData(x=[], y=[])
|
||||
|
||||
@pyqtSlot(dict)
|
||||
def redraw_scan(self, data):
|
||||
@pyqtSlot("PyQt_PyObject")
|
||||
def redraw_scan(self, msg):
|
||||
if not self.x_channel:
|
||||
return
|
||||
|
||||
data = msg.content["data"]
|
||||
|
||||
if self.x_channel not in data:
|
||||
logger.warning(f"Unknown channel `{self.x_channel}` for X data in {self.objectName()}")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user