0
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2025-07-13 19:21:50 +02:00

fix(rpc): gui hide/show also hide/show all floating docks

This commit is contained in:
2024-11-19 15:11:25 +01:00
committed by Mathias Guijarro
parent 96e255e4ef
commit c27d058b01
2 changed files with 26 additions and 0 deletions

View File

@ -461,6 +461,18 @@ class BECDockArea(RPCBase, BECGuiClientMixin):
list: The temporary areas in the dock area.
"""
@rpc_call
def show(self):
"""
Show all windows including floating docks.
"""
@rpc_call
def hide(self):
"""
Hide all windows including floating docks.
"""
class BECFigure(RPCBase):
@property

View File

@ -53,6 +53,8 @@ class BECDockArea(BECWidget, QWidget):
"attach_all",
"_get_all_rpc",
"temp_areas",
"show",
"hide",
]
def __init__(
@ -412,6 +414,18 @@ class BECDockArea(BECWidget, QWidget):
self.cleanup()
super().close()
def show(self):
"""Show all windows including floating docks."""
super().show()
for docks in self.panels.values():
docks.window().show()
def hide(self):
"""Hide all windows including floating docks."""
super().hide()
for docks in self.panels.values():
docks.window().hide()
if __name__ == "__main__":
from qtpy.QtWidgets import QApplication