yasmin_editor.editor_gui.ui.action_specs module

Declarative action definitions for menus and the compact main toolbar.

The toolbar intentionally stays compact. Core actions remain directly visible, while denser workflows are exposed through menus, shortcuts, and toolbar overflow buttons.

class yasmin_editor.editor_gui.ui.action_specs.ActionSpec(attribute_name: str, text: str, callback_name: str, shortcut: str = '', checkable: bool = False, separator_before: bool = False, tool_tip: str = '', status_tip: str = '')

Bases: object

Description of one QAction owned by the editor window.

attribute_name: str
callback_name: str
checkable: bool
separator_before: bool
shortcut: str
status_tip: str
text: str
tool_tip: str
yasmin_editor.editor_gui.ui.action_specs.action_specs_by_attribute(groups: Iterable[tuple[ActionSpec, ...]] = ((ActionSpec(attribute_name='new_action', text='New', callback_name='new_state_machine', shortcut='Ctrl+N', checkable=False, separator_before=False, tool_tip='Create a new state machine.', status_tip='Create a new empty state machine.'), ActionSpec(attribute_name='open_action', text='Open', callback_name='open_state_machine', shortcut='Ctrl+O', checkable=False, separator_before=False, tool_tip='Open a state machine XML file.', status_tip='Open a saved state machine from XML.'), ActionSpec(attribute_name='save_action', text='Save', callback_name='save_state_machine', shortcut='Ctrl+S', checkable=False, separator_before=False, tool_tip='Save the current state machine.', status_tip='Save the current state machine to XML.'), ActionSpec(attribute_name='undo_action', text='Undo', callback_name='undo_last_action', shortcut='Ctrl+Z', checkable=False, separator_before=True, tool_tip='Undo the last editor change.', status_tip='Restore the previous editor snapshot.'), ActionSpec(attribute_name='redo_action', text='Redo', callback_name='redo_last_action', shortcut='Ctrl+Shift+Z', checkable=False, separator_before=False, tool_tip='Redo the last undone editor change.', status_tip='Restore the next editor snapshot.'), ActionSpec(attribute_name='add_state_action', text='Add State', callback_name='add_state', shortcut='', checkable=False, separator_before=True, tool_tip='Add a plugin state to the current container.', status_tip='Create a new plugin state in the current container.'), ActionSpec(attribute_name='edit_current_action', text='Edit Current Container', callback_name='edit_current_container', shortcut='', checkable=False, separator_before=True, tool_tip='Edit the current container properties.', status_tip='Edit metadata and outcomes of the current container.'), ActionSpec(attribute_name='delete_action', text='Delete Selected', callback_name='delete_selected', shortcut='Delete', checkable=False, separator_before=False, tool_tip='Delete the selected items.', status_tip='Delete the current scene selection.')), (ActionSpec(attribute_name='new_action', text='New', callback_name='new_state_machine', shortcut='Ctrl+N', checkable=False, separator_before=False, tool_tip='Create a new state machine.', status_tip='Create a new empty state machine.'), ActionSpec(attribute_name='open_action', text='Open', callback_name='open_state_machine', shortcut='Ctrl+O', checkable=False, separator_before=False, tool_tip='Open a state machine XML file.', status_tip='Open a saved state machine from XML.'), ActionSpec(attribute_name='save_action', text='Save', callback_name='save_state_machine', shortcut='Ctrl+S', checkable=False, separator_before=False, tool_tip='Save the current state machine.', status_tip='Save the current state machine to XML.'), ActionSpec(attribute_name='save_as_action', text='Save As', callback_name='save_state_machine_as', shortcut='Ctrl+Shift+S', checkable=False, separator_before=False, tool_tip='Save the current state machine under a new file name.', status_tip='Choose a new XML file path and save the current state machine.')), (ActionSpec(attribute_name='add_state_action', text='Add State', callback_name='add_state', shortcut='', checkable=False, separator_before=False, tool_tip='Add a plugin state.', status_tip='Create a new plugin state in the current container.'), ActionSpec(attribute_name='add_state_machine_action', text='Add State Machine', callback_name='add_state_machine', shortcut='', checkable=False, separator_before=False, tool_tip='Add a nested state machine container.', status_tip='Create a nested state machine container.'), ActionSpec(attribute_name='add_concurrence_action', text='Add Concurrence', callback_name='add_concurrence', shortcut='', checkable=False, separator_before=False, tool_tip='Add a concurrence container.', status_tip='Create a new concurrence container.'), ActionSpec(attribute_name='add_final_action', text='Add Final Outcome', callback_name='add_final_outcome', shortcut='', checkable=False, separator_before=False, tool_tip='Add a final outcome to the current container.', status_tip='Create a final outcome node in the current container.'), ActionSpec(attribute_name='add_text_action', text='Add Text', callback_name='add_text_block', shortcut='', checkable=False, separator_before=False, tool_tip='Add a free-form text note.', status_tip='Create an editable text block in the current container.')), (ActionSpec(attribute_name='edit_current_action', text='Edit Current Container', callback_name='edit_current_container', shortcut='', checkable=False, separator_before=False, tool_tip='Edit the current container properties.', status_tip='Edit metadata and outcomes of the current container.'), ActionSpec(attribute_name='undo_action', text='Undo', callback_name='undo_last_action', shortcut='Ctrl+Z', checkable=False, separator_before=True, tool_tip='Undo the last editor change.', status_tip='Restore the previous editor snapshot.'), ActionSpec(attribute_name='redo_action', text='Redo', callback_name='redo_last_action', shortcut='Ctrl+Shift+Z', checkable=False, separator_before=False, tool_tip='Redo the last undone editor change.', status_tip='Restore the next editor snapshot.'), ActionSpec(attribute_name='delete_action', text='Delete Selected', callback_name='delete_selected', shortcut='Delete', checkable=False, separator_before=False, tool_tip='Delete the selected items.', status_tip='Delete the current scene selection.'), ActionSpec(attribute_name='copy_to_clipboard_action', text='Copy Selection', callback_name='start_copy_selection_placement', shortcut='Ctrl+C', checkable=False, separator_before=True, tool_tip='Create a copy of the current selection and place it manually.', status_tip='Copy the selected items and attach the copy to the cursor for manual placement.'), ActionSpec(attribute_name='extract_selection_action', text='Extract', callback_name='extract_selected_items', shortcut='Ctrl+E', checkable=False, separator_before=False, tool_tip='Extract the current selection into a container.', status_tip='Extract the selected items into a new nested container.')), (ActionSpec(attribute_name='toggle_clipboard_action', text='Toggle Shelf', callback_name='toggle_clipboard_panel', shortcut='Ctrl+Shift+B', checkable=True, separator_before=False, tool_tip='Show or hide the shelf dock.', status_tip='Toggle visibility of the editor shelf dock.'),), (ActionSpec(attribute_name='help_action', text='Help', callback_name='show_help', shortcut='', checkable=False, separator_before=False, tool_tip='Open the editor help dialog.', status_tip='Show the editor help dialog.'),))) dict[str, ActionSpec]

Return the last visible spec for each QAction attribute name.

yasmin_editor.editor_gui.ui.action_specs.iter_action_specs(groups: Iterable[tuple[ActionSpec, ...]] = ((ActionSpec(attribute_name='new_action', text='New', callback_name='new_state_machine', shortcut='Ctrl+N', checkable=False, separator_before=False, tool_tip='Create a new state machine.', status_tip='Create a new empty state machine.'), ActionSpec(attribute_name='open_action', text='Open', callback_name='open_state_machine', shortcut='Ctrl+O', checkable=False, separator_before=False, tool_tip='Open a state machine XML file.', status_tip='Open a saved state machine from XML.'), ActionSpec(attribute_name='save_action', text='Save', callback_name='save_state_machine', shortcut='Ctrl+S', checkable=False, separator_before=False, tool_tip='Save the current state machine.', status_tip='Save the current state machine to XML.'), ActionSpec(attribute_name='undo_action', text='Undo', callback_name='undo_last_action', shortcut='Ctrl+Z', checkable=False, separator_before=True, tool_tip='Undo the last editor change.', status_tip='Restore the previous editor snapshot.'), ActionSpec(attribute_name='redo_action', text='Redo', callback_name='redo_last_action', shortcut='Ctrl+Shift+Z', checkable=False, separator_before=False, tool_tip='Redo the last undone editor change.', status_tip='Restore the next editor snapshot.'), ActionSpec(attribute_name='add_state_action', text='Add State', callback_name='add_state', shortcut='', checkable=False, separator_before=True, tool_tip='Add a plugin state to the current container.', status_tip='Create a new plugin state in the current container.'), ActionSpec(attribute_name='edit_current_action', text='Edit Current Container', callback_name='edit_current_container', shortcut='', checkable=False, separator_before=True, tool_tip='Edit the current container properties.', status_tip='Edit metadata and outcomes of the current container.'), ActionSpec(attribute_name='delete_action', text='Delete Selected', callback_name='delete_selected', shortcut='Delete', checkable=False, separator_before=False, tool_tip='Delete the selected items.', status_tip='Delete the current scene selection.')), (ActionSpec(attribute_name='new_action', text='New', callback_name='new_state_machine', shortcut='Ctrl+N', checkable=False, separator_before=False, tool_tip='Create a new state machine.', status_tip='Create a new empty state machine.'), ActionSpec(attribute_name='open_action', text='Open', callback_name='open_state_machine', shortcut='Ctrl+O', checkable=False, separator_before=False, tool_tip='Open a state machine XML file.', status_tip='Open a saved state machine from XML.'), ActionSpec(attribute_name='save_action', text='Save', callback_name='save_state_machine', shortcut='Ctrl+S', checkable=False, separator_before=False, tool_tip='Save the current state machine.', status_tip='Save the current state machine to XML.'), ActionSpec(attribute_name='save_as_action', text='Save As', callback_name='save_state_machine_as', shortcut='Ctrl+Shift+S', checkable=False, separator_before=False, tool_tip='Save the current state machine under a new file name.', status_tip='Choose a new XML file path and save the current state machine.')), (ActionSpec(attribute_name='add_state_action', text='Add State', callback_name='add_state', shortcut='', checkable=False, separator_before=False, tool_tip='Add a plugin state.', status_tip='Create a new plugin state in the current container.'), ActionSpec(attribute_name='add_state_machine_action', text='Add State Machine', callback_name='add_state_machine', shortcut='', checkable=False, separator_before=False, tool_tip='Add a nested state machine container.', status_tip='Create a nested state machine container.'), ActionSpec(attribute_name='add_concurrence_action', text='Add Concurrence', callback_name='add_concurrence', shortcut='', checkable=False, separator_before=False, tool_tip='Add a concurrence container.', status_tip='Create a new concurrence container.'), ActionSpec(attribute_name='add_final_action', text='Add Final Outcome', callback_name='add_final_outcome', shortcut='', checkable=False, separator_before=False, tool_tip='Add a final outcome to the current container.', status_tip='Create a final outcome node in the current container.'), ActionSpec(attribute_name='add_text_action', text='Add Text', callback_name='add_text_block', shortcut='', checkable=False, separator_before=False, tool_tip='Add a free-form text note.', status_tip='Create an editable text block in the current container.')), (ActionSpec(attribute_name='edit_current_action', text='Edit Current Container', callback_name='edit_current_container', shortcut='', checkable=False, separator_before=False, tool_tip='Edit the current container properties.', status_tip='Edit metadata and outcomes of the current container.'), ActionSpec(attribute_name='undo_action', text='Undo', callback_name='undo_last_action', shortcut='Ctrl+Z', checkable=False, separator_before=True, tool_tip='Undo the last editor change.', status_tip='Restore the previous editor snapshot.'), ActionSpec(attribute_name='redo_action', text='Redo', callback_name='redo_last_action', shortcut='Ctrl+Shift+Z', checkable=False, separator_before=False, tool_tip='Redo the last undone editor change.', status_tip='Restore the next editor snapshot.'), ActionSpec(attribute_name='delete_action', text='Delete Selected', callback_name='delete_selected', shortcut='Delete', checkable=False, separator_before=False, tool_tip='Delete the selected items.', status_tip='Delete the current scene selection.'), ActionSpec(attribute_name='copy_to_clipboard_action', text='Copy Selection', callback_name='start_copy_selection_placement', shortcut='Ctrl+C', checkable=False, separator_before=True, tool_tip='Create a copy of the current selection and place it manually.', status_tip='Copy the selected items and attach the copy to the cursor for manual placement.'), ActionSpec(attribute_name='extract_selection_action', text='Extract', callback_name='extract_selected_items', shortcut='Ctrl+E', checkable=False, separator_before=False, tool_tip='Extract the current selection into a container.', status_tip='Extract the selected items into a new nested container.')), (ActionSpec(attribute_name='toggle_clipboard_action', text='Toggle Shelf', callback_name='toggle_clipboard_panel', shortcut='Ctrl+Shift+B', checkable=True, separator_before=False, tool_tip='Show or hide the shelf dock.', status_tip='Toggle visibility of the editor shelf dock.'),), (ActionSpec(attribute_name='help_action', text='Help', callback_name='show_help', shortcut='', checkable=False, separator_before=False, tool_tip='Open the editor help dialog.', status_tip='Show the editor help dialog.'),)))

Yield action specs in group order.

The helper is intentionally tiny, but it gives tests and menu/toolbar wiring one canonical way to walk the catalog.