18 from .ConfigurationPageBase import ConfigurationPageBase |
18 from .ConfigurationPageBase import ConfigurationPageBase |
19 from .Ui_HelpViewersPage import Ui_HelpViewersPage |
19 from .Ui_HelpViewersPage import Ui_HelpViewersPage |
20 |
20 |
21 import Preferences |
21 import Preferences |
22 import Utilities |
22 import Utilities |
|
23 import UI.PixmapCache |
23 |
24 |
24 |
25 |
25 class HelpViewersPage(ConfigurationPageBase, Ui_HelpViewersPage): |
26 class HelpViewersPage(ConfigurationPageBase, Ui_HelpViewersPage): |
26 """ |
27 """ |
27 Class implementing the Help Viewers configuration page. |
28 Class implementing the Help Viewers configuration page. |
31 Constructor |
32 Constructor |
32 """ |
33 """ |
33 super(HelpViewersPage, self).__init__() |
34 super(HelpViewersPage, self).__init__() |
34 self.setupUi(self) |
35 self.setupUi(self) |
35 self.setObjectName("HelpViewersPage") |
36 self.setObjectName("HelpViewersPage") |
|
37 |
|
38 self.customViewerSelectionButton.setIcon( |
|
39 UI.PixmapCache.getIcon("open.png")) |
36 |
40 |
37 self.helpViewerGroup = QButtonGroup() |
41 self.helpViewerGroup = QButtonGroup() |
38 self.helpViewerGroup.addButton(self.helpBrowserButton) |
42 self.helpViewerGroup.addButton(self.helpBrowserButton) |
39 self.helpViewerGroup.addButton(self.qtAssistantButton) |
43 self.helpViewerGroup.addButton(self.qtAssistantButton) |
40 self.helpViewerGroup.addButton(self.webBrowserButton) |
44 self.helpViewerGroup.addButton(self.webBrowserButton) |
77 """ |
81 """ |
78 Private slot to handle the custom viewer selection. |
82 Private slot to handle the custom viewer selection. |
79 """ |
83 """ |
80 file = E5FileDialog.getOpenFileName( |
84 file = E5FileDialog.getOpenFileName( |
81 self, |
85 self, |
82 self.trUtf8("Select Custom Viewer"), |
86 self.tr("Select Custom Viewer"), |
83 self.customViewerEdit.text(), |
87 self.customViewerEdit.text(), |
84 "") |
88 "") |
85 |
89 |
86 if file: |
90 if file: |
87 self.customViewerEdit.setText(Utilities.toNativeSeparators(file)) |
91 self.customViewerEdit.setText(Utilities.toNativeSeparators(file)) |
91 """ |
95 """ |
92 Private slot to handle the Web browser selection. |
96 Private slot to handle the Web browser selection. |
93 """ |
97 """ |
94 file = E5FileDialog.getOpenFileName( |
98 file = E5FileDialog.getOpenFileName( |
95 self, |
99 self, |
96 self.trUtf8("Select Web-Browser"), |
100 self.tr("Select Web-Browser"), |
97 self.webbrowserEdit.text(), |
101 self.webbrowserEdit.text(), |
98 "") |
102 "") |
99 |
103 |
100 if file: |
104 if file: |
101 self.webbrowserEdit.setText(Utilities.toNativeSeparators(file)) |
105 self.webbrowserEdit.setText(Utilities.toNativeSeparators(file)) |
105 """ |
109 """ |
106 Private slot to handle the PDF viewer selection. |
110 Private slot to handle the PDF viewer selection. |
107 """ |
111 """ |
108 file = E5FileDialog.getOpenFileName( |
112 file = E5FileDialog.getOpenFileName( |
109 self, |
113 self, |
110 self.trUtf8("Select PDF-Viewer"), |
114 self.tr("Select PDF-Viewer"), |
111 self.pdfviewerEdit.text(), |
115 self.pdfviewerEdit.text(), |
112 "") |
116 "") |
113 |
117 |
114 if file: |
118 if file: |
115 self.pdfviewerEdit.setText(Utilities.toNativeSeparators(file)) |
119 self.pdfviewerEdit.setText(Utilities.toNativeSeparators(file)) |
119 """ |
123 """ |
120 Private slot to handle the CHM viewer selection. |
124 Private slot to handle the CHM viewer selection. |
121 """ |
125 """ |
122 file = E5FileDialog.getOpenFileName( |
126 file = E5FileDialog.getOpenFileName( |
123 self, |
127 self, |
124 self.trUtf8("Select CHM-Viewer"), |
128 self.tr("Select CHM-Viewer"), |
125 self.chmviewerEdit.text(), |
129 self.chmviewerEdit.text(), |
126 "") |
130 "") |
127 |
131 |
128 if file: |
132 if file: |
129 self.chmviewerEdit.setText(Utilities.toNativeSeparators(file)) |
133 self.chmviewerEdit.setText(Utilities.toNativeSeparators(file)) |