From 6b25abff70280271e2eeb70450553c05d4b7c99c Mon Sep 17 00:00:00 2001 From: wyzula-jan Date: Wed, 26 Jun 2024 11:24:46 +0200 Subject: [PATCH] fix(motor_map): motor map can be removed from BECFigure with .remove() --- bec_widgets/cli/client.py | 13 +++++++++++++ .../widgets/figure/plots/motor_map/motor_map.py | 2 ++ 2 files changed, 15 insertions(+) diff --git a/bec_widgets/cli/client.py b/bec_widgets/cli/client.py index cba63b9d..eb1e7c0d 100644 --- a/bec_widgets/cli/client.py +++ b/bec_widgets/cli/client.py @@ -1206,6 +1206,13 @@ class BECImageShow(RPCBase): class BECMotorMap(RPCBase): + @property + @rpc_call + def rpc_id(self) -> "str": + """ + Get the RPC ID of the widget. + """ + @property @rpc_call def config_dict(self) -> "dict": @@ -1289,6 +1296,12 @@ class BECMotorMap(RPCBase): dict: Data of the motor map. """ + @rpc_call + def remove(self): + """ + Remove the plot widget from the figure. + """ + class BECPlotBase(RPCBase): @property diff --git a/bec_widgets/widgets/figure/plots/motor_map/motor_map.py b/bec_widgets/widgets/figure/plots/motor_map/motor_map.py index 46f6afdc..c43dc837 100644 --- a/bec_widgets/widgets/figure/plots/motor_map/motor_map.py +++ b/bec_widgets/widgets/figure/plots/motor_map/motor_map.py @@ -36,6 +36,7 @@ class MotorMapConfig(SubplotConfig): class BECMotorMap(BECPlotBase): USER_ACCESS = [ + "rpc_id", "config_dict", "change_motors", "set_max_points", @@ -44,6 +45,7 @@ class BECMotorMap(BECPlotBase): "set_background_value", "set_scatter_size", "get_data", + "remove", ] # QT Signals