Back to index

salome-gui  6.5.0
Classes | Functions | Variables
salome_pluginsmanager Namespace Reference

Classes

class  Context
class  PluginsManager

Functions

def initialize
def find_menu
def findMenu
def AddFunction
def entries

Variables

string SEP = ":"
tuple sgPyQt = SalomePyQt.SalomePyQt()
tuple sg = libSALOME_Swig.SALOMEGUI_Swig()
dictionary plugins = {}
 current_plugins_manager = None
tuple logger = Logger("PluginsManager")

Function Documentation

def salome_pluginsmanager.AddFunction (   name,
  description,
  script 
)
Add a plugin function
    Called by a user to register a function (script)

Definition at line 320 of file salome_pluginsmanager.py.

00320 
00321 def AddFunction(name,description,script):
00322    """ Add a plugin function
00323        Called by a user to register a function (script)
00324    """
00325    return current_plugins_manager.AddFunction(name,description,script)

Here is the caller graph for this function:

Return the list of entries in menu: can be sorted or modified in place to customize menu content 

Definition at line 326 of file salome_pluginsmanager.py.

00326 
00327 def entries():
00328   """ Return the list of entries in menu: can be sorted or modified in place to customize menu content """
00329   return current_plugins_manager.entries

Here is the caller graph for this function:

Definition at line 126 of file salome_pluginsmanager.py.

00126 
00127 def find_menu(smenu):
00128   lmenus=smenu.split("|")
00129   main=lmenus.pop(0).strip()
00130   menu=sgPyQt.getPopupMenu(main)
00131   return findMenu(lmenus,menu)

Here is the call graph for this function:

def salome_pluginsmanager.findMenu (   lmenu,
  menu 
)

Definition at line 132 of file salome_pluginsmanager.py.

00132 
00133 def findMenu(lmenu,menu):
00134   if not lmenu:return menu
00135   m=lmenu.pop(0).strip()
00136   for a in menu.actions():
00137     if a.menu():
00138       if a.text() == m:
00139         return findMenu(lmenu,a.menu())
00140 
00141 PLUGIN_PATH_PATTERN="share/salome/plugins"
MATCH_ENDING_PATTERN="_plugins.py"

Here is the caller graph for this function:

def salome_pluginsmanager.initialize (   module,
  name,
  basemenuname,
  menuname 
)

Definition at line 107 of file salome_pluginsmanager.py.

00107 
00108 def initialize(module,name,basemenuname,menuname):
00109   if not plugins.has_key(name):
00110     if module:
00111       plugins[name]={}
00112     else:
00113       plugins[name]=[]
00114   if module:
00115     studyId=sg.getActiveStudyId()
00116     if plugins[name].has_key(studyId):return
00117     plugins[name][studyId]=PluginsManager(module,name,basemenuname,menuname)
00118   else:
00119     plugins[name].append(PluginsManager(module,name,basemenuname,menuname))

Here is the caller graph for this function:


Variable Documentation

Definition at line 105 of file salome_pluginsmanager.py.

tuple salome_pluginsmanager.logger = Logger("PluginsManager")

Definition at line 145 of file salome_pluginsmanager.py.

Definition at line 104 of file salome_pluginsmanager.py.

Definition at line 92 of file salome_pluginsmanager.py.

Definition at line 102 of file salome_pluginsmanager.py.

tuple salome_pluginsmanager.sgPyQt = SalomePyQt.SalomePyQt()

Definition at line 98 of file salome_pluginsmanager.py.