0
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2025-07-14 03:31:50 +02:00

fix(widget/plots): added "get_config" to all children of BECConnector to USER_ACCESS

This commit is contained in:
2024-04-10 17:55:27 +02:00
parent 92cea90971
commit ee617b73a2
4 changed files with 33 additions and 0 deletions

View File

@ -705,6 +705,16 @@ class BECCurve(RPCBase):
tuple[np.ndarray,np.ndarray]: X and Y data of the curve.
"""
@rpc_call
def get_config(self, dict_output: "bool" = True) -> "dict | BaseModel":
"""
Get the configuration of the widget.
Args:
dict_output(bool): If True, return the configuration as a dictionary. If False, return the configuration as a pydantic model.
Returns:
dict: The configuration of the plot widget.
"""
class BECImageShow(RPCBase):
@rpc_call
@ -746,6 +756,16 @@ class BECImageShow(RPCBase):
dict[str, dict[str, BECImageItem]]: The dictionary of images.
"""
@rpc_call
def get_config(self, dict_output: "bool" = True) -> "dict | BaseModel":
"""
Get the configuration of the widget.
Args:
dict_output(bool): If True, return the configuration as a dictionary. If False, return the configuration as a pydantic model.
Returns:
dict: The configuration of the plot widget.
"""
@rpc_call
def add_monitor_image(
self,
@ -1174,6 +1194,16 @@ class BECMotorMap(RPCBase):
validate_bec(bool, optional): If True, validate the signal with BEC. Defaults to True.
"""
@rpc_call
def get_config(self, dict_output: "bool" = True) -> "dict | BaseModel":
"""
Get the configuration of the widget.
Args:
dict_output(bool): If True, return the configuration as a dictionary. If False, return the configuration as a pydantic model.
Returns:
dict: The configuration of the plot widget.
"""
@rpc_call
def set_max_points(self, max_points: "int") -> "None":
"""

View File

@ -285,6 +285,7 @@ class BECImageShow(BECPlotBase):
"get_image_config",
"get_image_list",
"get_image_dict",
"get_config",
"add_monitor_image",
"add_custom_image",
"set_vrange",

View File

@ -37,6 +37,7 @@ class MotorMapConfig(WidgetConfig):
class BECMotorMap(BECPlotBase):
USER_ACCESS = [
"change_motors",
"get_config",
"set_max_points",
"set_precision",
"set_num_dim_points",

View File

@ -74,6 +74,7 @@ class BECCurve(BECConnector, pg.PlotDataItem):
"set_pen_width",
"set_pen_style",
"get_data",
"get_config",
]
def __init__(