From 8efa93d2d2c5e6c28008e1bbde89e5cc8a01d139 Mon Sep 17 00:00:00 2001 From: wakonig_k Date: Tue, 15 Apr 2025 12:07:54 +0200 Subject: [PATCH] feat(launch_window): add user access permissions --- bec_widgets/applications/launch_window.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bec_widgets/applications/launch_window.py b/bec_widgets/applications/launch_window.py index 8e2c0938..1274ec79 100644 --- a/bec_widgets/applications/launch_window.py +++ b/bec_widgets/applications/launch_window.py @@ -133,6 +133,7 @@ class LaunchTile(RoundedFrame): class LaunchWindow(BECMainWindow): RPC = True TILE_SIZE = (250, 300) + USER_ACCESS = ["show_launcher", "hide_launcher"] def __init__( self, parent=None, gui_id: str = None, window_title="BEC Launcher", *args, **kwargs @@ -282,7 +283,7 @@ class LaunchWindow(BECMainWindow): if widget.attrib.get("class") == "QMainWindow": raise ValueError( - "Loading a QMainWindow from a UI file is currently not supported." + "Loading a QMainWindow from a UI file is currently not supported. " "If you need this, please contact the BEC team or create a ticket on gitlab.psi.ch/bec/bec_widgets." ) @@ -355,9 +356,15 @@ class LaunchWindow(BECMainWindow): return auto_updates def show_launcher(self): + """ + Show the launcher window. + """ self.show() def hide_launcher(self): + """ + Hide the launcher window. + """ self.hide() def showEvent(self, event):