qubx :: util_types :: ToolRegistry :: Class ToolRegistry
[hide private]
[frames] | no frames]

Class ToolRegistry

source code

object --+
         |
        ToolRegistry

A collection of tools or actions, grouped by category.

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
register(self, cat, caption, action=None, tool_class=None) source code

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

Instance Variables [hide private]
  OnRegister
WeakEvent(category_name, caption, action, tool_class) when register() is called
  by_cat
{ category_name : {caption : (action, tool_class)} }
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

register(self, cat, caption, action=None, tool_class=None)

source code 
Parameters:
  • cat - category name
  • caption - i.e. to show in menu
  • action - lambda menuitem: do_something()
  • tool_class - qubx.toolspace.Tool subclass to be instantiated and activated (ignored unless action is None)