schrodinger.maestro_utils.surface_manager.menus module¶
- class schrodinger.maestro_utils.surface_manager.menus.MenuActions¶
Bases:
Enum
Enum for menu actions.
- HIDE_SURFACE = 'Hide Surface'¶
- SHOW_SURFACE = 'Show Surface'¶
- CHANGE_DISPLAY = 'Change Display'¶
- MODIFY_VOLUME = 'Modify Volume'¶
- VIEW_INFO = 'View Info'¶
- SEPARATOR = 'Separator'¶
- DUPLICATE = 'Duplicate'¶
- SPLIT_PAIR = 'Split Pair'¶
- DELETE = 'Delete'¶
- SHOW_BOUNDING_BOX = 'Show Bounding Box'¶
- HIDE_BOUNDING_BOX = 'Hide Bounding Box'¶
- EXPORT_VOLUME_TO_MAP = 'Export Volume to Map...'¶
- HIDE_ALL = 'Hide All'¶
- SHOW_ALL = 'Show All'¶
- DELETE_ALL = 'Delete All'¶
- IMPORT_SURFACE_OR_VOLUME = 'Import Surface or Volume...'¶
- EXPORT_ALL_DATA = 'Export All Data...'¶
- CHANGE_CREATION_DEFAULTS = 'Change Creation Defaults...'¶
- CHANGE_VIEW_SETTINGS = 'Change View Settings...'¶
- HELP = 'Help...'¶
- class schrodinger.maestro_utils.surface_manager.menus.MenuActionData(action_name: MenuActions, callback_name: str | None, visible: bool = True, enabled: bool = True)¶
Bases:
object
Class to hold information about a menu action.
- Variables:
action_name – Name of the action.
callback_name – Name of the callback function or signal.
visible – Boolean indicating whether the action is visible.
enabled – Boolean indicating whether the action is enabled.
- action_name: MenuActions¶
- callback_name: str | None¶
- visible: bool = True¶
- enabled: bool = True¶
- __init__(action_name: MenuActions, callback_name: str | None, visible: bool = True, enabled: bool = True) → None¶
- class schrodinger.maestro_utils.surface_manager.menus.BaseMenu¶
Bases:
QMenu
Base class for menus.
- populateMenu()¶
Populate the menu with actions.
- onActionTriggered(callback_name: str | None)¶
Handle the action triggered event.
- Parameters:
callback_name – Name of the callback function or signal.
- filterAction(action: MenuActionData) → bool¶
Filter the action based on its visibility.
- Parameters:
action – The action to filter.
- Returns:
True if the action should be shown, False otherwise.
- getMenuActions() → list[MenuActionData]¶
Get the menu actions.
- Returns:
List of menu action data.
- class schrodinger.maestro_utils.surface_manager.menus.BaseSurfaceActionsMenu(parent: QWidget)¶
Bases:
BaseMenu
Base class for surface actions menu.
- __init__(parent: QWidget)¶
Initialize the context menu for the given surfaces.
- Parameters:
parent – The parent widget.
- setSelectedSurfaceInfo(selected_surfaces_info: list[SurfaceInfo])¶
Set the selected surfaces info. :param selected_surfaces_info: List of selected surface info objects.
- getMenuActions() → list[MenuActionData]¶
Get the menu actions.
- Returns:
List of menu action data.
- class schrodinger.maestro_utils.surface_manager.menus.SurfaceContextMenu(parent: QWidget, right_clicked_surface_info: SurfaceInfo, selected_surfaces_info: list[SurfaceInfo])¶
Bases:
BaseSurfaceActionsMenu
Context menu for surface nodes in the workspace surfaces table. Some options are shown based on the state of the right-clicked surface.
- __init__(parent: QWidget, right_clicked_surface_info: SurfaceInfo, selected_surfaces_info: list[SurfaceInfo])¶
Initialize the context menu for the given surfaces.
- Parameters:
parent – The parent widget.
right_clicked_surface_info – The surface info object for the surface that was right-clicked on.
selected_surfaces_info – List of selected surface info objects.
- class schrodinger.maestro_utils.surface_manager.menus.EntryContextMenu(parent: QWidget, entry_check_state: CheckState)¶
Bases:
BaseMenu
Context menu for entry nodes in the workspace surfaces table.
- Variables:
notifyToShowSurfaces (pyqtSignal) – Signal to show all surfaces.
notifyToHideSurfaces (pyqtSignal) – Signal to hide all surfaces.
notifyToDeleteSurfaces (pyqtSignal) – Signal to delete all surfaces.
- notifyToShowSurfaces¶
A
pyqtSignal
emitted by instances of the class.
- notifyToHideSurfaces¶
A
pyqtSignal
emitted by instances of the class.
- notifyToDeleteSurfaces¶
A
pyqtSignal
emitted by instances of the class.
- __init__(parent: QWidget, entry_check_state: CheckState)¶
Initialize the context menu based on the check state of the entry nodes.
- Parameters:
parent – The parent widget.
entry_check_state – The check state of the entry nodes. It can be either checked/unchecked/partially checked.
- getMenuActions() → list[MenuActionData]¶
Get the menu actions.
- Returns:
List of menu action data.
- class schrodinger.maestro_utils.surface_manager.menus.SurfaceActionsMenu(parent: QWidget)¶
Bases:
BaseSurfaceActionsMenu
Surface actions menu for the surface manager panel top toolbar.
- __init__(parent: QWidget)¶
Initialize the context menu for the given surfaces.
- Parameters:
parent – The parent widget.
- refreshMenu(selected_surfaces_info: list[SurfaceInfo])¶
Refresh the menu with the selected surfaces info.
- Parameters:
selected_surfaces_info – List of selected surface info objects.
- class schrodinger.maestro_utils.surface_manager.menus.GlobalActionsMenu(parent: QWidget)¶
Bases:
BaseMenu
Global actions menu for the surface manager. This menu is used to provide actions that are not specific to a single surface or entry. The actions apply to all surfaces.
- __init__(parent: QWidget)¶
Initialize the global actions menu. :param parent: The parent widget.
- refreshMenu(surfaces_present: bool)¶
Refresh the menu with the current state of surfaces. :param surfaces_present: Boolean indicating if surfaces are present.
- getMenuActions() → list[MenuActionData]¶
Get the menu actions. :return: List of menu action data.