actionmanager — Provides text path based access to main menu actions¶
Use this module for adding own actions to the main menu
Shortcuts are configured by appshortcuts plugin
-
class
enki.core.actionmanager.ActionMenuBar(parent, actionManager)¶ Bases:
QMenuBarMenu bar implementation. Contains actions, managed by ActionManager. Instance is created by MainWindow
-
class
enki.core.actionmanager.ActionManager(parent=None)¶ Bases:
QObjectClass provides text path based access to main menu actions
-
actionInserted¶ actionInserted(action)
Signal emitted, when new action has been inserted to the menu
-
actionChanged¶ actionChanged(action)
Signal emitted, when some action datahas been changed
-
actionRemoved¶ actionRemoved(action)
Signal emitted, when action has been removed from the menu
-
del_()¶
-
action(path)¶ Get action by its path. i.e. actionManager.action(“mFile/mClose/aAll”)
-
menu(path)¶ Get action by its path. i.e. actionManager.action(“mFile/mClose/aAll”)
-
path(action)¶ Get action path by reference to action
-
allActions()¶ Reqursive list of existing actions
-
addAction(path, action, icon=<QIcon object>, shortcut=None)¶ Add new action to the menu. Returns created QAction object.
actionmight be string text or QAction instance.
-
removeAction(pathOrAction, removeEmptyPath=False)¶ Remove action from the menu
-
addMenu(path, text, icon=<QIcon object>)¶ Add menu to the main menu or submenu of main menu
-
removeMenu(action, removeEmptyPath=False)¶ Remove menu. If removeEmptyPath is True - remove also empty parent menus
-
parentAction(action)¶ Parent action of the action
-
children(action)¶ List of children of action
-
defaultShortcut(action)¶ Get actions default shortcut
-
setDefaultShortcut(action, shortcut)¶ Set actions default shortcut
-