QScintilla/Editor.py

changeset 2034
8de0fc1f7fef
parent 2031
c36c2eb62a75
child 2077
68a34718a0ce
--- a/QScintilla/Editor.py	Sun Sep 09 19:38:07 2012 +0200
+++ b/QScintilla/Editor.py	Mon Sep 10 18:42:28 2012 +0200
@@ -788,6 +788,9 @@
         self.applicationDiagramMenuAct = \
             menu.addAction(self.trUtf8('Application Diagram...'),
                 self.__showApplicationDiagram)
+        menu.addSeparator()
+        menu.addAction(UI.PixmapCache.getIcon("open.png"),
+            self.trUtf8("Load Diagram..."), self.__loadDiagram)
         
         menu.aboutToShow.connect(self.__showContextMenuGraphics)
         
@@ -5848,6 +5851,17 @@
                                             self, noModules=not res)
         self.applicationDiagram.show()
     
+    def __loadDiagram(self):
+        """
+        Private slot to load a diagram from file.
+        """
+        from Graphics.UMLDialog import UMLDialog
+        self.loadedDiagram = UMLDialog(UMLDialog.NoDiagram, self.project, parent=self)
+        if self.loadedDiagram.load():
+            self.loadedDiagram.show(fromFile=True)
+        else:
+            self.loadedDiagram = None
+    
     #######################################################################
     ## Typing aids related methods below
     #######################################################################

eric ide

mercurial