Uranium
Application Framework
Loading...
Searching...
No Matches
UM.Extension.Extension Class Reference

Base class for plugins that extend the functionality of Uranium. More...

Inheritance diagram for UM.Extension.Extension:
UM.PluginObject.PluginObject

Public Member Functions

 __init__ (self)
 
 addMenuItem (self, str name, Callable[[], Any] func)
 Add an item to the sub-menu of the extension.
 
 setMenuName (self, str name)
 Set name of the menu where all menu items are placed in.
 
str getMenuName (self)
 Get the name of the menu where all menu items are placed in.
 
 activateMenuItem (self, str name)
 Call function associated with option.
 
List[str] getMenuItemList (self)
 Get list of all menu item names.
 
- Public Member Functions inherited from UM.PluginObject.PluginObject
 __init__ (self)
 
 getPluginId (self)
 
 setPluginId (self, plugin_id)
 

Protected Attributes

 _menu_function_dict
 
 _menu_name
 
- Protected Attributes inherited from UM.PluginObject.PluginObject
 _plugin_id
 

Detailed Description

Base class for plugins that extend the functionality of Uranium.

Every extension adds a (sub) menu to the extension menu with one or more menu items.

Constructor & Destructor Documentation

◆ __init__()

UM.Extension.Extension.__init__ (   self)

Reimplemented from UM.PluginObject.PluginObject.

Member Function Documentation

◆ activateMenuItem()

UM.Extension.Extension.activateMenuItem (   self,
str  name 
)

Call function associated with option.

Parameters
namestring

◆ addMenuItem()

UM.Extension.Extension.addMenuItem (   self,
str  name,
Callable[[], Any]  func 
)

Add an item to the sub-menu of the extension.

Parameters
namestring
functionfunction

◆ getMenuItemList()

List[str] UM.Extension.Extension.getMenuItemList (   self)

Get list of all menu item names.

Returns
list

◆ getMenuName()

str UM.Extension.Extension.getMenuName (   self)

Get the name of the menu where all menu items are placed in.

Parameters
menuname string

◆ setMenuName()

UM.Extension.Extension.setMenuName (   self,
str  name 
)

Set name of the menu where all menu items are placed in.

Parameters
namestring

The documentation for this class was generated from the following file: