4.31. umbra.managers.actionsManager — Umbra 1.0.8 documentation

### Navigation

- index
- modules |
- next |
- previous |
- Umbra 1.0.8 documentation »
- 4. Api »

# 4.31. umbra.managers.actionsManager

actionsManager.py

Platform:
  Windows, Linux, Mac Os X.
Description:
  This module defines the `ActionsManager` class.
  The `ActionsManager` class provides a centralized hub to manage Applications actions.
  It defines methods to register, unregister and list actions.

Others:

## 4.31.1. Module Attributes

`umbra.managers.actionsManager.` `LOGGER`

## 4.31.2. Classes

class `umbra.managers.actionsManager.` `ActionsManager`(parent=None, namespaceSplitter=u'|', rootNamespace=u'Actions', defaultNamespace=u'Others')

  Bases: `PyQt4.QtCore.QObject`

  This class is a QObject subclass providing an actions manager.

  Parameters: | parent – Object parent. ( QObject ) namespaceSplitter – Namespace splitters character. ( String ) rootNamespace – Root foundations.namespace. ( String ) defaultNamespace – Default namespace ( For actions with relative path ). ( String )

  `namespaceSplitter`

    This method is the property for self.__namespaceSplitter attribute.

    Returns: | self.__namespaceSplitter. ( String )

  `rootNamespace`

    This method is the property for self.__rootNamespace attribute.

    Returns: | self.__rootNamespace. ( String )

  `defaultNamespace`

    This method is the property for self.__defaultNamespace attribute.

    Returns: | self.__defaultNamespace. ( String )

  `categories`

    This method is the property for self.__categories attribute.

    Returns: | self.__categories. ( Dictionary )

  `listActions`()

    This method returns the registered actions.

    Returns: | Actions list. ( List )

  `getCategory`(name, vivify=False)

    This method returns requested category.

    Parameters: | name – Category to retrieve. ( String ) vivify – Vivify missing parents in the chain to the requested category. ( Boolean )
    Returns: | Category. ( Dictionary )

  `addToCategory`(category, name, action)

    This method adds given action to given category.

    Parameters: | category – Category to store the action. ( String ) name – Action name. ( String ) action – Action object. ( QAction )
    Returns: | Method success. ( Boolean )

  `removeFromCategory`(category, name)

    This method removes given action from given category.

    Parameters: | category – Category to remove the action from. ( String ) name – Action name. ( String )
    Returns: | Method success. ( Boolean )

  `getAction`(action)

    This method returns requested action.

    Parameters: | action – Action name. ( String )
    Returns: | Action. ( QAction )

  `isActionRegistered`(name)

    This method returns if the given action name is registered.

    Parameters: | name – Action name. ( String )
    Returns: | Is action registered. ( Boolean )

  `registerAction`(name, **kwargs)

    This method registers given action name, optional arguments like a parent, icon, slot etc ... can be given.

    Parameters: | name – Action to register. ( String ) **kwargs – Keywords arguments. ( ** )
    Returns: | Action. ( QAction )

  `unregisterAction`(name)

    This method unregisters given action name.

    Parameters: | name – Action to register. ( String )
    Returns: | Method success. ( Boolean )

  `isShortcutInUse`(shortcut)

    This method returns if given action shortcut is in use.

    Parameters: | name – Action shortcut. ( String )
    Returns: | Is shortcut in use. ( Boolean )

  `getShortcut`(name)

    This method returns given action shortcut.

    Parameters: | name – Action to retrieve the shortcut. ( String )
    Returns: | Action shortcut. ( String )

  `setShortcut`(name, shortcut)

    This method sets given action shortcut.

    Parameters: | name – Action to set the shortcut. ( String ) shortcut – Shortcut to set. ( String )
    Returns: | Method success. ( Boolean )

### Navigation

- index
- modules |
- next |
- previous |
- Umbra 1.0.8 documentation »
- 4. Api »