10 import os |
10 import os |
11 |
11 |
12 from PyQt6.QtCore import Qt, QObject |
12 from PyQt6.QtCore import Qt, QObject |
13 from PyQt6.QtGui import QKeySequence |
13 from PyQt6.QtGui import QKeySequence |
14 |
14 |
15 from EricGui.EricAction import EricAction |
15 from eric7.EricGui.EricAction import EricAction |
16 |
16 |
17 import UI.PixmapCache |
17 from eric7.EricGui import EricPixmapCache |
18 |
18 |
19 |
19 |
20 class Translator(QObject): |
20 class Translator(QObject): |
21 """ |
21 """ |
22 Class implementing the translator object. |
22 Class implementing the translator object. |
59 else "flag-{0}".format(self.__iconSuffix) |
59 else "flag-{0}".format(self.__iconSuffix) |
60 ) |
60 ) |
61 self.__ui.addSideWidget( |
61 self.__ui.addSideWidget( |
62 self.__ui.BottomSide, |
62 self.__ui.BottomSide, |
63 self.__widget, |
63 self.__widget, |
64 UI.PixmapCache.getIcon( |
64 EricPixmapCache.getIcon( |
65 os.path.join(os.path.dirname(__file__), "icons", iconName) |
65 os.path.join(os.path.dirname(__file__), "icons", iconName) |
66 ), |
66 ), |
67 self.tr("Translator"), |
67 self.tr("Translator"), |
68 ) |
68 ) |
69 |
69 |
107 @param name name of the icon file |
107 @param name name of the icon file |
108 @type str |
108 @type str |
109 @return icon |
109 @return icon |
110 @rtype QIcon |
110 @rtype QIcon |
111 """ |
111 """ |
112 return UI.PixmapCache.getIcon( |
112 return EricPixmapCache.getIcon( |
113 os.path.join( |
113 os.path.join( |
114 os.path.dirname(__file__), |
114 os.path.dirname(__file__), |
115 "icons", |
115 "icons", |
116 "{0}-{1}".format(name, self.__iconSuffix), |
116 "{0}-{1}".format(name, self.__iconSuffix), |
117 ) |
117 ) |