diff --git a/bec_widgets/cli/client.py b/bec_widgets/cli/client.py index 331592f3..f21711cf 100644 --- a/bec_widgets/cli/client.py +++ b/bec_widgets/cli/client.py @@ -24,36 +24,22 @@ class _WidgetsEnumType(str, enum.Enum): _Widgets = { - "AbortButton": "AbortButton", - "BECColorMapWidget": "BECColorMapWidget", "BECDockArea": "BECDockArea", "BECProgressBar": "BECProgressBar", "BECQueue": "BECQueue", "BECStatusBox": "BECStatusBox", "DapComboBox": "DapComboBox", - "DarkModeButton": "DarkModeButton", "DeviceBrowser": "DeviceBrowser", "DeviceComboBox": "DeviceComboBox", "DeviceLineEdit": "DeviceLineEdit", "Image": "Image", - "LMFitDialog": "LMFitDialog", "LogPanel": "LogPanel", - "Minesweeper": "Minesweeper", "MotorMap": "MotorMap", "MultiWaveform": "MultiWaveform", "PositionIndicator": "PositionIndicator", - "PositionerBox": "PositionerBox", - "PositionerBox2D": "PositionerBox2D", - "PositionerControlLine": "PositionerControlLine", - "ResetButton": "ResetButton", - "ResumeButton": "ResumeButton", "RingProgressBar": "RingProgressBar", "ScanControl": "ScanControl", - "ScanMetadata": "ScanMetadata", "ScatterWaveform": "ScatterWaveform", - "SignalComboBox": "SignalComboBox", - "SignalLineEdit": "SignalLineEdit", - "StopButton": "StopButton", "TextBox": "TextBox", "VSCodeEditor": "VSCodeEditor", "Waveform": "Waveform", @@ -86,25 +72,6 @@ for plugin_name, plugin_class in inspect.getmembers(plugin_client, inspect.iscla globals()[plugin_name] = plugin_class -class AbortButton(RPCBase): - """A button that abort the scan.""" - - @rpc_call - def remove(self): - """ - Cleanup the BECConnector - """ - - -class BECColorMapWidget(RPCBase): - @property - @rpc_call - def colormap(self): - """ - Get the current colormap name. - """ - - class BECDock(RPCBase): @property @rpc_call @@ -343,7 +310,8 @@ class BECDockArea(RPCBase): @rpc_call def remove(self) -> "None": """ - Remove the dock area. + Remove the dock area. If the dock area is embedded in a BECMainWindow and + is set as the central widget, the main window will be closed. """ @rpc_call @@ -407,14 +375,6 @@ class BECDockArea(RPCBase): """ -class BECMainWindow(RPCBase): - @rpc_call - def remove(self): - """ - Cleanup the BECConnector - """ - - class BECProgressBar(RPCBase): """A custom progress bar with smooth transitions. The displayed text can be customized using a template.""" @@ -683,23 +643,6 @@ class DapComboBox(RPCBase): """ -class DarkModeButton(RPCBase): - @rpc_call - def toggle_dark_mode(self) -> "None": - """ - Toggle the dark mode state. This will change the theme of the entire - application to dark or light mode. - """ - - -class DemoApp(RPCBase): - @rpc_call - def remove(self): - """ - Cleanup the BECConnector - """ - - class DeviceBrowser(RPCBase): @rpc_call def remove(self): @@ -738,16 +681,6 @@ class DeviceLineEdit(RPCBase): """ -class DeviceSignalInputBase(RPCBase): - """Mixin base class for device signal input widgets.""" - - @rpc_call - def remove(self): - """ - Cleanup the BECConnector - """ - - class Image(RPCBase): @property @rpc_call @@ -1407,16 +1340,6 @@ class ImageItem(RPCBase): """ -class LMFitDialog(RPCBase): - """Dialog for displaying the fit summary and params for LMFit DAP processes""" - - @rpc_call - def remove(self): - """ - Cleanup the BECConnector - """ - - class LogPanel(RPCBase): """Displays a log panel""" @@ -1439,9 +1362,6 @@ class LogPanel(RPCBase): """ -class Minesweeper(RPCBase): ... - - class MotorMap(RPCBase): @property @rpc_call @@ -2279,64 +2199,6 @@ class PositionIndicator(RPCBase): """ -class PositionerBox(RPCBase): - """Simple Widget to control a positioner in box form""" - - @rpc_call - def set_positioner(self, positioner: "str | Positioner"): - """ - Set the device - - Args: - positioner (Positioner | str) : Positioner to set, accepts str or the device - """ - - -class PositionerBox2D(RPCBase): - """Simple Widget to control two positioners in box form""" - - @rpc_call - def set_positioner_hor(self, positioner: "str | Positioner"): - """ - Set the device - - Args: - positioner (Positioner | str) : Positioner to set, accepts str or the device - """ - - @rpc_call - def set_positioner_ver(self, positioner: "str | Positioner"): - """ - Set the device - - Args: - positioner (Positioner | str) : Positioner to set, accepts str or the device - """ - - -class PositionerBoxBase(RPCBase): - """Contains some core logic for positioner box widgets""" - - @rpc_call - def remove(self): - """ - Cleanup the BECConnector - """ - - -class PositionerControlLine(RPCBase): - """A widget that controls a single device.""" - - @rpc_call - def set_positioner(self, positioner: "str | Positioner"): - """ - Set the device - - Args: - positioner (Positioner | str) : Positioner to set, accepts str or the device - """ - - class PositionerGroup(RPCBase): """Simple Widget to control a positioner in box form""" @@ -2349,26 +2211,6 @@ class PositionerGroup(RPCBase): """ -class ResetButton(RPCBase): - """A button that resets the scan queue.""" - - @rpc_call - def remove(self): - """ - Cleanup the BECConnector - """ - - -class ResumeButton(RPCBase): - """A button that continue scan queue.""" - - @rpc_call - def remove(self): - """ - Cleanup the BECConnector - """ - - class Ring(RPCBase): @rpc_call def _get_all_rpc(self) -> "dict": @@ -2656,16 +2498,6 @@ class ScanControl(RPCBase): """ -class ScanMetadata(RPCBase): - """Dynamically generates a form for inclusion of metadata for a scan. Uses the""" - - @rpc_call - def remove(self): - """ - Cleanup the BECConnector - """ - - class ScatterCurve(RPCBase): """Scatter curve item for the scatter waveform widget.""" @@ -3019,36 +2851,6 @@ class ScatterWaveform(RPCBase): """ -class SignalComboBox(RPCBase): - """Line edit widget for device input with autocomplete for device names.""" - - @rpc_call - def remove(self): - """ - Cleanup the BECConnector - """ - - -class SignalLineEdit(RPCBase): - """Line edit widget for device input with autocomplete for device names.""" - - @rpc_call - def remove(self): - """ - Cleanup the BECConnector - """ - - -class StopButton(RPCBase): - """A button that stops the current scan.""" - - @rpc_call - def remove(self): - """ - Cleanup the BECConnector - """ - - class TextBox(RPCBase): """A widget that displays text in plain and HTML format""" @@ -3579,60 +3381,3 @@ class WebsiteWidget(RPCBase): """ Go forward in the history """ - - -class WindowWithUi(RPCBase): - """This is just testing app wiht UI file which could be connected to RPC.""" - - @rpc_call - def new_dock_area( - self, name: str | None = None, geometry: tuple[int, int, int, int] | None = None - ) -> "BECDockArea": - """ - Create a new dock area. - - Args: - name(str): The name of the dock area. - geometry(tuple): The geometry parameters to be passed to the dock area. - Returns: - BECDockArea: The newly created dock area. - """ - - @property - @rpc_call - def all_connections(self) -> list: - """ - None - """ - - @rpc_call - def change_theme(self, theme): - """ - None - """ - - @property - @rpc_call - def dock_area(self): - """ - None - """ - - @rpc_call - def register_all_rpc(self): - """ - None - """ - - @property - @rpc_call - def widget_list(self) -> list: - """ - Return a list of all widgets in the application. - """ - - @rpc_call - def list_app_hierarchy(self): - """ - List the hierarchy of the application. - """