src/eric7/Plugins/PluginAbout.py

branch
eric7
changeset 9413
80c06d472826
parent 9221
bf71ee032bb4
child 9473
3f23dbf37dbe
equal deleted inserted replaced
9412:45e7bb09c120 9413:80c06d472826
8 """ 8 """
9 9
10 from PyQt6.QtCore import QObject 10 from PyQt6.QtCore import QObject
11 from PyQt6.QtGui import QAction 11 from PyQt6.QtGui import QAction
12 12
13 import UI.Info 13 from eric7.UI import Info
14 import UI.PixmapCache 14 from eric7.EricGui import EricPixmapCache
15 15
16 from EricGui.EricAction import EricAction 16 from eric7.EricGui.EricAction import EricAction
17 from EricWidgets import EricMessageBox 17 from eric7.EricWidgets 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
23 deactivateable = True 23 deactivateable = True
24 version = UI.Info.VersionOnly 24 version = Info.VersionOnly
25 className = "AboutPlugin" 25 className = "AboutPlugin"
26 packageName = "__core__" 26 packageName = "__core__"
27 shortDescription = "Show the About dialogs." 27 shortDescription = "Show the About dialogs."
28 longDescription = """This plugin shows the About dialogs.""" 28 longDescription = """This plugin shows the About dialogs."""
29 pyqtApi = 2 29 pyqtApi = 2
75 Private method to initialize the actions. 75 Private method to initialize the actions.
76 """ 76 """
77 acts = [] 77 acts = []
78 78
79 self.aboutAct = EricAction( 79 self.aboutAct = EricAction(
80 self.tr("About {0}").format(UI.Info.Program), 80 self.tr("About {0}").format(Info.Program),
81 UI.PixmapCache.getIcon("helpAbout"), 81 EricPixmapCache.getIcon("helpAbout"),
82 self.tr("&About {0}").format(UI.Info.Program), 82 self.tr("&About {0}").format(Info.Program),
83 0, 83 0,
84 0, 84 0,
85 self, 85 self,
86 "about_eric", 86 "about_eric",
87 ) 87 )
88 self.aboutAct.setStatusTip(self.tr("Display information about this software")) 88 self.aboutAct.setStatusTip(self.tr("Display information about this software"))
89 self.aboutAct.setWhatsThis( 89 self.aboutAct.setWhatsThis(
90 self.tr( 90 self.tr(
91 """<b>About {0}</b>""" 91 """<b>About {0}</b>"""
92 """<p>Display some information about this software.</p>""" 92 """<p>Display some information about this software.</p>"""
93 ).format(UI.Info.Program) 93 ).format(Info.Program)
94 ) 94 )
95 self.aboutAct.triggered.connect(self.__about) 95 self.aboutAct.triggered.connect(self.__about)
96 self.aboutAct.setMenuRole(QAction.MenuRole.AboutRole) 96 self.aboutAct.setMenuRole(QAction.MenuRole.AboutRole)
97 acts.append(self.aboutAct) 97 acts.append(self.aboutAct)
98 98
99 self.aboutQtAct = EricAction( 99 self.aboutQtAct = EricAction(
100 self.tr("About Qt"), 100 self.tr("About Qt"),
101 UI.PixmapCache.getIcon("helpAboutQt"), 101 EricPixmapCache.getIcon("helpAboutQt"),
102 self.tr("About &Qt"), 102 self.tr("About &Qt"),
103 0, 103 0,
104 0, 104 0,
105 self, 105 self,
106 "about_qt", 106 "about_qt",
136 136
137 def __about(self): 137 def __about(self):
138 """ 138 """
139 Private slot to handle the About dialog. 139 Private slot to handle the About dialog.
140 """ 140 """
141 from AboutPlugin.AboutDialog import AboutDialog 141 from eric7.Plugins.AboutPlugin.AboutDialog import AboutDialog
142 142
143 if self.__aboutDialog is None: 143 if self.__aboutDialog is None:
144 self.__aboutDialog = AboutDialog(self.__ui) 144 self.__aboutDialog = AboutDialog(self.__ui)
145 self.__aboutDialog.show() 145 self.__aboutDialog.show()
146 146
147 def __aboutQt(self): 147 def __aboutQt(self):
148 """ 148 """
149 Private slot to handle the About Qt dialog. 149 Private slot to handle the About Qt dialog.
150 """ 150 """
151 EricMessageBox.aboutQt(self.__ui, UI.Info.Program) 151 EricMessageBox.aboutQt(self.__ui, Info.Program)

eric ide

mercurial