--- a/PluginProjectDjango.py Wed Jan 01 14:47:54 2014 +0100 +++ b/PluginProjectDjango.py Sat Jan 25 17:41:00 2014 +0100 @@ -28,7 +28,7 @@ author = "Detlev Offenbach <detlev@die-offenbachs.de>" autoactivate = True deactivateable = True -version = "3.2.1" +version = "3.3.0" className = "ProjectDjangoPlugin" packageName = "ProjectDjango" shortDescription = "Project support for Django projects." @@ -421,3 +421,27 @@ lexerAssociationCallback=self.lexerAssociationCallback, binaryTranslationsCallback= self.binaryTranslationsCallback) + + def getMenu(self, name): + """ + Public method to get a reference to the requested menu. + + @param name name of the menu (string) + @return reference to the menu (QMenu) or None, if no + menu with the given name exists + """ + if self.__object is not None: + return self.__object.getMenu(name) + else: + return None + + def getMenuNames(self): + """ + Public method to get the names of all menus. + + @return menu names (list of string) + """ + if self.__object is not None: + return list(self.__menus.keys()) + else: + return []