QScintilla/Editor.py

changeset 2034
8de0fc1f7fef
parent 2031
c36c2eb62a75
child 2077
68a34718a0ce
equal deleted inserted replaced
2033:4b99609f6a87 2034:8de0fc1f7fef
786 menu.addAction(self.trUtf8('Imports Diagram...'), 786 menu.addAction(self.trUtf8('Imports Diagram...'),
787 self.__showImportsDiagram) 787 self.__showImportsDiagram)
788 self.applicationDiagramMenuAct = \ 788 self.applicationDiagramMenuAct = \
789 menu.addAction(self.trUtf8('Application Diagram...'), 789 menu.addAction(self.trUtf8('Application Diagram...'),
790 self.__showApplicationDiagram) 790 self.__showApplicationDiagram)
791 menu.addSeparator()
792 menu.addAction(UI.PixmapCache.getIcon("open.png"),
793 self.trUtf8("Load Diagram..."), self.__loadDiagram)
791 794
792 menu.aboutToShow.connect(self.__showContextMenuGraphics) 795 menu.aboutToShow.connect(self.__showContextMenuGraphics)
793 796
794 return menu 797 return menu
795 798
5846 yesDefault=True) 5849 yesDefault=True)
5847 self.applicationDiagram = UMLDialog(UMLDialog.ApplicationDiagram, self.project, 5850 self.applicationDiagram = UMLDialog(UMLDialog.ApplicationDiagram, self.project,
5848 self, noModules=not res) 5851 self, noModules=not res)
5849 self.applicationDiagram.show() 5852 self.applicationDiagram.show()
5850 5853
5854 def __loadDiagram(self):
5855 """
5856 Private slot to load a diagram from file.
5857 """
5858 from Graphics.UMLDialog import UMLDialog
5859 self.loadedDiagram = UMLDialog(UMLDialog.NoDiagram, self.project, parent=self)
5860 if self.loadedDiagram.load():
5861 self.loadedDiagram.show(fromFile=True)
5862 else:
5863 self.loadedDiagram = None
5864
5851 ####################################################################### 5865 #######################################################################
5852 ## Typing aids related methods below 5866 ## Typing aids related methods below
5853 ####################################################################### 5867 #######################################################################
5854 5868
5855 def __toggleTypingAids(self): 5869 def __toggleTypingAids(self):

eric ide

mercurial