SBAction#
- class samson.SBAction(*args, **kwargs)#
Bases:
pybind11_objectBase class for SAMSON GUI actions.
SBAction derives from QAction and represents interactive commands shown in menus, toolbars, contextual menus, and command search.
Overloaded function.
__init__(self: samson.SBAction, UUID: samson.SBUUID = SBUUID(“00000000-0000-0000-0000-000000000000”)) -> None
Constructs an action with an optional UUID.
- Parameters:
UUID (SBUUID, optional) – Action UUID. If omitted, an invalid UUID is used.
__init__(self: samson.SBAction, text: str, UUID: samson.SBUUID = SBUUID(“00000000-0000-0000-0000-000000000000”)) -> None
Constructs an action with display text and an optional UUID.
- Parameters:
text (str) – Action text.
UUID (SBUUID, optional) – Action UUID.
- run(self: samson.SBAction, nodeIndexer: samson.SBNodeIndexer) None#
Runs this action on nodes in nodeIndexer.
By default, when an action is triggered (via the SBAction.trigger function or by triggering it via UI) it is applied to the whole document or to the current selection depending on the action’s implementation. If an action implements this function, it can be applied directly to nodes in nodeIndexer without selecting them first.
Note: this function is implemented only in a subset of actions.
- Parameters:
nodeIndexer (SBNodeIndexer) – Indexer of nodes to which the action should be applied.
- trigger(self: samson.SBAction) None#
Triggers the action.
- property UUID#
Returns the action UUID.
- property addableToFavoritesFlag#
Returns whether this action can be added to favorites.
- property badge#
Badge value shown on the action (if supported by UI).
- property descriptionImagePath#
Returns the path to an optional image used in action descriptions.
- property favoriteFlag#
Favorite state.
- property hasFavoriteFlag#
Returns True if the action can currently be favorited.
- property highlightingFlag#
Highlighting state.
- property isDiscoverable#
Returns True if the action can be discovered by the user.
- property isLocked#
Returns True if the action is locked.
- property name#
Returns the action class name.
- property objectName#
Returns the action object name.
- property text#
Returns the action text.