mirror of
https://github.com/bec-project/bec_widgets.git
synced 2025-07-13 19:21:50 +02:00
feat(launch_window): add user access permissions
This commit is contained in:
@ -133,6 +133,7 @@ class LaunchTile(RoundedFrame):
|
|||||||
class LaunchWindow(BECMainWindow):
|
class LaunchWindow(BECMainWindow):
|
||||||
RPC = True
|
RPC = True
|
||||||
TILE_SIZE = (250, 300)
|
TILE_SIZE = (250, 300)
|
||||||
|
USER_ACCESS = ["show_launcher", "hide_launcher"]
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, parent=None, gui_id: str = None, window_title="BEC Launcher", *args, **kwargs
|
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":
|
if widget.attrib.get("class") == "QMainWindow":
|
||||||
raise ValueError(
|
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."
|
"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
|
return auto_updates
|
||||||
|
|
||||||
def show_launcher(self):
|
def show_launcher(self):
|
||||||
|
"""
|
||||||
|
Show the launcher window.
|
||||||
|
"""
|
||||||
self.show()
|
self.show()
|
||||||
|
|
||||||
def hide_launcher(self):
|
def hide_launcher(self):
|
||||||
|
"""
|
||||||
|
Hide the launcher window.
|
||||||
|
"""
|
||||||
self.hide()
|
self.hide()
|
||||||
|
|
||||||
def showEvent(self, event):
|
def showEvent(self, event):
|
||||||
|
Reference in New Issue
Block a user