From e68e2b5978339475b97555c3e20795807932fbc9 Mon Sep 17 00:00:00 2001 From: Mathias Guijarro Date: Thu, 21 Nov 2024 13:54:54 +0100 Subject: [PATCH] feat(client): add show()/hide() methods to "gui" object --- bec_widgets/cli/client_utils.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/bec_widgets/cli/client_utils.py b/bec_widgets/cli/client_utils.py index eb4fb22e..cebc3597 100644 --- a/bec_widgets/cli/client_utils.py +++ b/bec_widgets/cli/client_utils.py @@ -228,6 +228,16 @@ class BECGuiClientMixin: if wait: self._gui_started_event.wait() + def show_all(self): + self._gui_started_event.wait() + rpc_client = RPCBase(gui_id=f"{self._gui_id}:window", parent=self) + rpc_client._run_rpc("show") + + def hide_all(self): + self._gui_started_event.wait() + rpc_client = RPCBase(gui_id=f"{self._gui_id}:window", parent=self) + rpc_client._run_rpc("hide") + def close(self) -> None: """ Close the gui window.