20 |
20 |
21 class Translator(QObject): |
21 class Translator(QObject): |
22 """ |
22 """ |
23 Class implementing the translator object. |
23 Class implementing the translator object. |
24 """ |
24 """ |
25 def __init__(self, plugin, parent=None): |
25 def __init__(self, plugin, usesDarkPalette, parent=None): |
26 """ |
26 """ |
27 Constructor |
27 Constructor |
28 |
28 |
29 @param plugin reference to the plugin object (TranslatorPlugin) |
29 @param plugin reference to the plugin object (TranslatorPlugin) |
30 @param parent parent (QObject) |
30 @param parent parent (QObject) |
44 |
49 |
45 self.__widget = TranslatorWidget(self.__plugin, self) |
50 self.__widget = TranslatorWidget(self.__plugin, self) |
46 self.__ui.addSideWidget( |
51 self.__ui.addSideWidget( |
47 self.__ui.BottomSide, self.__widget, |
52 self.__ui.BottomSide, self.__widget, |
48 UI.PixmapCache.getIcon( |
53 UI.PixmapCache.getIcon( |
49 os.path.join(os.path.dirname(__file__), "icons", "flag.png")), |
54 os.path.join(os.path.dirname(__file__), "icons", |
|
55 "flag-{0}".format(self.__iconSuffix))), |
50 self.tr("Translator")) |
56 self.tr("Translator")) |
51 |
57 |
52 self.__activateAct = E5Action( |
58 self.__activateAct = E5Action( |
53 self.tr('Translator'), |
59 self.tr('Translator'), |
54 self.tr('T&ranslator'), |
60 self.tr('T&ranslator'), |
83 |
89 |
84 @param name name of the icon file (string) |
90 @param name name of the icon file (string) |
85 @return icon (QIcon) |
91 @return icon (QIcon) |
86 """ |
92 """ |
87 return UI.PixmapCache.getIcon(os.path.join( |
93 return UI.PixmapCache.getIcon(os.path.join( |
88 os.path.dirname(__file__), "icons", name)) |
94 os.path.dirname(__file__), "icons", |
|
95 "{0}-{1}".format(name, self.__iconSuffix) |
|
96 )) |
89 |
97 |
90 def __activateWidget(self): |
98 def __activateWidget(self): |
91 """ |
99 """ |
92 Private slot to handle the activation of the project browser. |
100 Private slot to handle the activation of the project browser. |
93 """ |
101 """ |