eric7/Plugins/UiExtensionPlugins/Translator/TranslatorEngines/__init__.py

branch
eric7
changeset 8356
68ec9c3d4de5
parent 8318
962bce857696
child 8358
144a6b854f70
equal deleted inserted replaced
8355:8a7677a63c8d 8356:68ec9c3d4de5
10 import os 10 import os
11 11
12 from PyQt6.QtCore import QCoreApplication 12 from PyQt6.QtCore import QCoreApplication
13 from PyQt6.QtGui import QIcon 13 from PyQt6.QtGui import QIcon
14 14
15 from E5Gui.E5Application import e5App 15 from E5Gui.EricApplication import ericApp
16 16
17 import UI.PixmapCache 17 import UI.PixmapCache
18 18
19 19
20 def supportedEngineNames(): 20 def supportedEngineNames():
109 @param name name of the translation engine 109 @param name name of the translation engine
110 @type str 110 @type str
111 @return engine icon 111 @return engine icon
112 @rtype QIcon 112 @rtype QIcon
113 """ 113 """
114 iconSuffix = "dark" if e5App().usesDarkPalette() else "light" 114 iconSuffix = "dark" if ericApp().usesDarkPalette() else "light"
115 if name in supportedEngineNames(): 115 if name in supportedEngineNames():
116 icon = UI.PixmapCache.getIcon(os.path.join( 116 icon = UI.PixmapCache.getIcon(os.path.join(
117 os.path.dirname(__file__), "..", "icons", "engines", 117 os.path.dirname(__file__), "..", "icons", "engines",
118 "{0}-{1}".format(name, iconSuffix))) 118 "{0}-{1}".format(name, iconSuffix)))
119 if icon.isNull(): 119 if icon.isNull():

eric ide

mercurial