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

WIP buttons removed from RPC access

This commit is contained in:
2025-04-04 12:00:55 +02:00
parent 9af9ef3830
commit 5e5ce4d367
7 changed files with 7 additions and 65 deletions

View File

@ -15,14 +15,11 @@ class Widgets(str, enum.Enum):
Enum for the available widgets.
"""
AbortButton = "AbortButton"
BECColorMapWidget = "BECColorMapWidget"
BECDockArea = "BECDockArea"
BECProgressBar = "BECProgressBar"
BECQueue = "BECQueue"
BECStatusBox = "BECStatusBox"
DapComboBox = "DapComboBox"
DarkModeButton = "DarkModeButton"
DeviceBrowser = "DeviceBrowser"
DeviceComboBox = "DeviceComboBox"
DeviceLineEdit = "DeviceLineEdit"
@ -36,39 +33,17 @@ class Widgets(str, enum.Enum):
PositionerBox = "PositionerBox"
PositionerBox2D = "PositionerBox2D"
PositionerControlLine = "PositionerControlLine"
ResetButton = "ResetButton"
ResumeButton = "ResumeButton"
RingProgressBar = "RingProgressBar"
ScanControl = "ScanControl"
ScatterWaveform = "ScatterWaveform"
SignalComboBox = "SignalComboBox"
SignalLineEdit = "SignalLineEdit"
StopButton = "StopButton"
TextBox = "TextBox"
VSCodeEditor = "VSCodeEditor"
Waveform = "Waveform"
WebsiteWidget = "WebsiteWidget"
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
@ -625,15 +600,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):
@ -2291,26 +2257,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":
@ -2981,16 +2927,6 @@ class SignalLineEdit(RPCBase):
"""
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"""

View File

@ -10,6 +10,7 @@ class AbortButton(BECWidget, QWidget):
"""A button that abort the scan."""
PLUGIN = True
RPC = False
ICON_NAME = "cancel"
def __init__(

View File

@ -10,6 +10,7 @@ class ResetButton(BECWidget, QWidget):
"""A button that resets the scan queue."""
PLUGIN = True
RPC = False
ICON_NAME = "restart_alt"
def __init__(self, parent=None, client=None, config=None, gui_id=None, toolbar=False, **kwargs):

View File

@ -10,6 +10,7 @@ class ResumeButton(BECWidget, QWidget):
"""A button that continue scan queue."""
PLUGIN = True
RPC = False
ICON_NAME = "resume"
def __init__(self, parent=None, client=None, config=None, gui_id=None, toolbar=False, **kwargs):

View File

@ -10,6 +10,7 @@ class StopButton(BECWidget, QWidget):
"""A button that stops the current scan."""
PLUGIN = True
RPC = False
ICON_NAME = "dangerous"
def __init__(self, parent=None, client=None, config=None, gui_id=None, toolbar=False, **kwargs):

View File

@ -11,6 +11,7 @@ class BECColorMapWidget(BECWidget, QWidget):
ICON_NAME = "palette"
USER_ACCESS = ["colormap"]
PLUGIN = True
RPC = False
def __init__(self, parent=None, cmap: str = "magma", **kwargs):
super().__init__(**kwargs)

View File

@ -9,10 +9,11 @@ from bec_widgets.utils.colors import set_theme
class DarkModeButton(BECWidget, QWidget):
USER_ACCESS = ["toggle_dark_mode"]
USER_ACCESS = []
ICON_NAME = "dark_mode"
PLUGIN = True
RPC = False
def __init__(
self,