Preferences/ConfigurationPages/HelpInterfacePage.py

changeset 3190
a9a94491c4fd
parent 3186
a05eff845522
child 3484
645c12de6b0c
equal deleted inserted replaced
3189:9a21c547de5f 3190:a9a94491c4fd
14 from .Ui_HelpInterfacePage import Ui_HelpInterfacePage 14 from .Ui_HelpInterfacePage import Ui_HelpInterfacePage
15 15
16 import Preferences 16 import Preferences
17 import Utilities 17 import Utilities
18 import UI.PixmapCache 18 import UI.PixmapCache
19
19 20
20 class HelpInterfacePage(ConfigurationPageBase, Ui_HelpInterfacePage): 21 class HelpInterfacePage(ConfigurationPageBase, Ui_HelpInterfacePage):
21 """ 22 """
22 Class implementing the Interface configuration page (variant for web 23 Class implementing the Interface configuration page (variant for web
23 browser). 24 browser).
54 """ 55 """
55 Private method to populate the style combo box. 56 Private method to populate the style combo box.
56 """ 57 """
57 curStyle = Preferences.getUI("Style") 58 curStyle = Preferences.getUI("Style")
58 styles = sorted(list(QStyleFactory.keys())) 59 styles = sorted(list(QStyleFactory.keys()))
59 self.styleComboBox.addItem(self.trUtf8('System'), "System") 60 self.styleComboBox.addItem(self.tr('System'), "System")
60 for style in styles: 61 for style in styles:
61 self.styleComboBox.addItem(style, style) 62 self.styleComboBox.addItem(style, style)
62 currentIndex = self.styleComboBox.findData(curStyle) 63 currentIndex = self.styleComboBox.findData(curStyle)
63 if currentIndex == -1: 64 if currentIndex == -1:
64 currentIndex = 0 65 currentIndex = 0
69 """ 70 """
70 Private method to select the style sheet file via a dialog. 71 Private method to select the style sheet file via a dialog.
71 """ 72 """
72 file = E5FileDialog.getOpenFileName( 73 file = E5FileDialog.getOpenFileName(
73 self, 74 self,
74 self.trUtf8("Select style sheet file"), 75 self.tr("Select style sheet file"),
75 self.styleSheetEdit.text(), 76 self.styleSheetEdit.text(),
76 self.trUtf8( 77 self.tr(
77 "Qt Style Sheets (*.qss);;Cascading Style Sheets (*.css);;" 78 "Qt Style Sheets (*.qss);;Cascading Style Sheets (*.css);;"
78 "All files (*)")) 79 "All files (*)"))
79 80
80 if file: 81 if file:
81 self.styleSheetEdit.setText(Utilities.toNativeSeparators(file)) 82 self.styleSheetEdit.setText(Utilities.toNativeSeparators(file))

eric ide

mercurial