PluginProjectDjango.py

changeset 32
fd79d080b065
parent 31
a632d10fdb7c
child 34
7b511ce3bc88
--- 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 []

eric ide

mercurial