6.58. 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:

6.58.1. Module Attributes

umbra.managers.actionsManager.LOGGER

6.58.2. Classes

class umbra.managers.actionsManager.ActionsManager(parent=None, namespaceSplitter='|', rootNamespace='Actions', defaultNamespace='Others')[source]

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[source]

This method is the property for self.__namespaceSplitter attribute.

Returns:self.__namespaceSplitter. ( String )
rootNamespace[source]

This method is the property for self.__rootNamespace attribute.

Returns:self.__rootNamespace. ( String )
defaultNamespace[source]

This method is the property for self.__defaultNamespace attribute.

Returns:self.__defaultNamespace. ( String )
categories[source]

This method is the property for self.__categories attribute.

Returns:self.__categories. ( Dictionary )
listActions()[source]

This method returns the registered actions.

Returns:Actions list. ( List )
getCategory(name, vivify=False)[source]

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)[source]

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)[source]

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)[source]

This method returns requested action.

Parameters:action – Action name. ( String )
Returns:Action. ( QAction )
isActionRegistered(name)[source]

This method returns if the given action name is registered.

Parameters:name – Action name. ( String )
Returns:Is action registered. ( Boolean )
registerAction(name, **kwargs)[source]

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)[source]

This method unregisters given action name.

Parameters:name – Action to register. ( String )
Returns:Method success. ( Boolean )
isShortcutInUse(shortcut)[source]

This method returns if given action shortcut is in use.

Parameters:name – Action shortcut. ( String )
Returns:Is shortcut in use. ( Boolean )
getShortcut(name)[source]

This method returns given action shortcut.

Parameters:name – Action to retrieve the shortcut. ( String )
Returns:Action shortcut. ( String )
setShortcut(name, shortcut)[source]

This method sets given action shortcut.

Parameters:
  • name – Action to set the shortcut. ( String )
  • shortcut – Shortcut to set. ( String )
Returns:

Method success. ( Boolean )

Table Of Contents

Previous topic

6.57. umbra.launcher

Next topic

6.59. umbra.managers.fileSystemEventsManager

This Page