Script scripterng_hooks :: Class MenuHooks
[hide private]
[frames] | no frames]

Class MenuHooks

source code

object --+
         |
        MenuHooks

This class lets extension-scripts hook into the main menu of Scribus.

Instance Methods [hide private]
 
__init__(self, window=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
createMenu(self, title) source code
 
iter_menus(self) source code
QMenu
findMenu(self, title)
find a menu with a given title
source code
 
actionForMenu(self, menu) source code
QAction instance
insertMenuBefore(self, before_menu, new_menu)
Insert a menu after another menu in the menubar
source code
 
menuAfter(self, menu) source code
 
appendMenu(self, menu)
Probably not that usefull because it will add a menu after the help menu
source code
 
insertMenuAfter(self, after_menu, new_menu)
Insert a menu before another menu in the menubar
source code
 
appendItem(self, menu, item, *extra_args) source code
 
appendSeparator(self, menu) source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, window=None)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

findMenu(self, title)

source code 

find a menu with a given title

Parameters:
  • title (string) - English title of the menu
Returns: QMenu
None if no menu was found, else the menu with title

insertMenuBefore(self, before_menu, new_menu)

source code 

Insert a menu after another menu in the menubar

Parameters:
  • before_menu - menu which should be after the newly inserted menu
Returns: QAction instance
action for inserted menu