Plugins/PluginAbout.py

changeset 55
b5c84934de9c
parent 13
1af94a91f439
child 398
5b5636320dca
child 792
a13346916170
equal deleted inserted replaced
54:31463df17fd5 55:b5c84934de9c
11 from PyQt4.QtGui import QMessageBox 11 from PyQt4.QtGui import QMessageBox
12 12
13 from UI.Info import * 13 from UI.Info import *
14 import UI.PixmapCache 14 import UI.PixmapCache
15 15
16 from E4Gui.E4Action import E4Action 16 from E5Gui.E5Action import E5Action
17 17
18 from AboutPlugin.AboutDialog import AboutDialog 18 from AboutPlugin.AboutDialog import AboutDialog
19 19
20 # Start-Of-Header 20 # Start-Of-Header
21 name = "About Plugin" 21 name = "About Plugin"
63 menu = self.__ui.getMenu("help") 63 menu = self.__ui.getMenu("help")
64 if menu: 64 if menu:
65 menu.removeAction(self.aboutAct) 65 menu.removeAction(self.aboutAct)
66 menu.removeAction(self.aboutQtAct) 66 menu.removeAction(self.aboutQtAct)
67 acts = [self.aboutAct, self.aboutQtAct] 67 acts = [self.aboutAct, self.aboutQtAct]
68 self.__ui.removeE4Actions(acts, 'ui') 68 self.__ui.removeE5Actions(acts, 'ui')
69 69
70 def __initActions(self): 70 def __initActions(self):
71 """ 71 """
72 Private method to initialize the actions. 72 Private method to initialize the actions.
73 """ 73 """
74 acts = [] 74 acts = []
75 75
76 self.aboutAct = E4Action(self.trUtf8('About {0}').format(Program), 76 self.aboutAct = E5Action(self.trUtf8('About {0}').format(Program),
77 UI.PixmapCache.getIcon("helpAbout.png"), 77 UI.PixmapCache.getIcon("helpAbout.png"),
78 self.trUtf8('&About {0}').format(Program), 78 self.trUtf8('&About {0}').format(Program),
79 0, 0, self, 'about_eric') 79 0, 0, self, 'about_eric')
80 self.aboutAct.setStatusTip(self.trUtf8('Display information about this software')) 80 self.aboutAct.setStatusTip(self.trUtf8('Display information about this software'))
81 self.aboutAct.setWhatsThis(self.trUtf8( 81 self.aboutAct.setWhatsThis(self.trUtf8(
83 """<p>Display some information about this software.</p>""" 83 """<p>Display some information about this software.</p>"""
84 ).format(Program)) 84 ).format(Program))
85 self.connect(self.aboutAct, SIGNAL('triggered()'), self.__about) 85 self.connect(self.aboutAct, SIGNAL('triggered()'), self.__about)
86 acts.append(self.aboutAct) 86 acts.append(self.aboutAct)
87 87
88 self.aboutQtAct = E4Action(self.trUtf8('About Qt'), 88 self.aboutQtAct = E5Action(self.trUtf8('About Qt'),
89 UI.PixmapCache.getIcon("helpAboutQt.png"), 89 UI.PixmapCache.getIcon("helpAboutQt.png"),
90 self.trUtf8('About &Qt'), 0, 0, self, 'about_qt') 90 self.trUtf8('About &Qt'), 0, 0, self, 'about_qt')
91 self.aboutQtAct.setStatusTip(\ 91 self.aboutQtAct.setStatusTip(\
92 self.trUtf8('Display information about the Qt toolkit')) 92 self.trUtf8('Display information about the Qt toolkit'))
93 self.aboutQtAct.setWhatsThis(self.trUtf8( 93 self.aboutQtAct.setWhatsThis(self.trUtf8(
95 """<p>Display some information about the Qt toolkit.</p>""" 95 """<p>Display some information about the Qt toolkit.</p>"""
96 )) 96 ))
97 self.connect(self.aboutQtAct, SIGNAL('triggered()'), self.__aboutQt) 97 self.connect(self.aboutQtAct, SIGNAL('triggered()'), self.__aboutQt)
98 acts.append(self.aboutQtAct) 98 acts.append(self.aboutQtAct)
99 99
100 self.__ui.addE4Actions(acts, 'ui') 100 self.__ui.addE5Actions(acts, 'ui')
101 101
102 def __initMenu(self): 102 def __initMenu(self):
103 """ 103 """
104 Private method to add the actions to the right menu. 104 Private method to add the actions to the right menu.
105 """ 105 """

eric ide

mercurial