PluginProjectPyramid.py

changeset 64
3b2da211e126
parent 63
f249a66da0d5
child 66
c8f88c9e4453
diff -r f249a66da0d5 -r 3b2da211e126 PluginProjectPyramid.py
--- a/PluginProjectPyramid.py	Wed Jan 01 14:47:56 2014 +0100
+++ b/PluginProjectPyramid.py	Sat Jan 25 17:43:06 2014 +0100
@@ -28,7 +28,7 @@
 author = "Detlev Offenbach <detlev@die-offenbachs.de>"
 autoactivate = True
 deactivateable = True
-version = "1.4.0"
+version = "1.5.0"
 className = "ProjectPyramidPlugin"
 packageName = "ProjectPyramid"
 shortDescription = "Project support for Pyramid projects."
@@ -406,3 +406,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