eric7/Plugins/PluginAbout.py

branch
eric7
changeset 8356
68ec9c3d4de5
parent 8318
962bce857696
child 8358
144a6b854f70
equal deleted inserted replaced
8355:8a7677a63c8d 8356:68ec9c3d4de5
11 from PyQt6.QtGui import QAction 11 from PyQt6.QtGui import QAction
12 12
13 import UI.Info 13 import UI.Info
14 import UI.PixmapCache 14 import UI.PixmapCache
15 15
16 from E5Gui.E5Action import E5Action 16 from E5Gui.EricAction import EricAction
17 from E5Gui import E5MessageBox 17 from E5Gui import EricMessageBox
18 18
19 # Start-Of-Header 19 # Start-Of-Header
20 name = "About Plugin" 20 name = "About Plugin"
21 author = "Detlev Offenbach <detlev@die-offenbachs.de>" 21 author = "Detlev Offenbach <detlev@die-offenbachs.de>"
22 autoactivate = True 22 autoactivate = True
65 menu = self.__ui.getMenu("help") 65 menu = self.__ui.getMenu("help")
66 if menu: 66 if menu:
67 menu.removeAction(self.aboutAct) 67 menu.removeAction(self.aboutAct)
68 menu.removeAction(self.aboutQtAct) 68 menu.removeAction(self.aboutQtAct)
69 acts = [self.aboutAct, self.aboutQtAct] 69 acts = [self.aboutAct, self.aboutQtAct]
70 self.__ui.removeE5Actions(acts, 'ui') 70 self.__ui.removeEricActions(acts, 'ui')
71 71
72 def __initActions(self): 72 def __initActions(self):
73 """ 73 """
74 Private method to initialize the actions. 74 Private method to initialize the actions.
75 """ 75 """
76 acts = [] 76 acts = []
77 77
78 self.aboutAct = E5Action( 78 self.aboutAct = EricAction(
79 self.tr('About {0}').format(UI.Info.Program), 79 self.tr('About {0}').format(UI.Info.Program),
80 UI.PixmapCache.getIcon("helpAbout"), 80 UI.PixmapCache.getIcon("helpAbout"),
81 self.tr('&About {0}').format(UI.Info.Program), 81 self.tr('&About {0}').format(UI.Info.Program),
82 0, 0, self, 'about_eric') 82 0, 0, self, 'about_eric')
83 self.aboutAct.setStatusTip(self.tr( 83 self.aboutAct.setStatusTip(self.tr(
88 ).format(UI.Info.Program)) 88 ).format(UI.Info.Program))
89 self.aboutAct.triggered.connect(self.__about) 89 self.aboutAct.triggered.connect(self.__about)
90 self.aboutAct.setMenuRole(QAction.MenuRole.AboutRole) 90 self.aboutAct.setMenuRole(QAction.MenuRole.AboutRole)
91 acts.append(self.aboutAct) 91 acts.append(self.aboutAct)
92 92
93 self.aboutQtAct = E5Action( 93 self.aboutQtAct = EricAction(
94 self.tr('About Qt'), 94 self.tr('About Qt'),
95 UI.PixmapCache.getIcon("helpAboutQt"), 95 UI.PixmapCache.getIcon("helpAboutQt"),
96 self.tr('About &Qt'), 0, 0, self, 'about_qt') 96 self.tr('About &Qt'), 0, 0, self, 'about_qt')
97 self.aboutQtAct.setStatusTip( 97 self.aboutQtAct.setStatusTip(
98 self.tr('Display information about the Qt toolkit')) 98 self.tr('Display information about the Qt toolkit'))
102 )) 102 ))
103 self.aboutQtAct.triggered.connect(self.__aboutQt) 103 self.aboutQtAct.triggered.connect(self.__aboutQt)
104 self.aboutQtAct.setMenuRole(QAction.MenuRole.AboutQtRole) 104 self.aboutQtAct.setMenuRole(QAction.MenuRole.AboutQtRole)
105 acts.append(self.aboutQtAct) 105 acts.append(self.aboutQtAct)
106 106
107 self.__ui.addE5Actions(acts, 'ui') 107 self.__ui.addEricActions(acts, 'ui')
108 108
109 def __initMenu(self): 109 def __initMenu(self):
110 """ 110 """
111 Private method to add the actions to the right menu. 111 Private method to add the actions to the right menu.
112 """ 112 """
131 131
132 def __aboutQt(self): 132 def __aboutQt(self):
133 """ 133 """
134 Private slot to handle the About Qt dialog. 134 Private slot to handle the About Qt dialog.
135 """ 135 """
136 E5MessageBox.aboutQt(self.__ui, UI.Info.Program) 136 EricMessageBox.aboutQt(self.__ui, UI.Info.Program)

eric ide

mercurial