6 """ |
6 """ |
7 Module implementing the Help Viewers configuration page. |
7 Module implementing the Help Viewers configuration page. |
8 """ |
8 """ |
9 |
9 |
10 from PyQt4.QtCore import pyqtSlot |
10 from PyQt4.QtCore import pyqtSlot |
11 from PyQt4.QtGui import QButtonGroup, QFileDialog |
11 from PyQt4.QtGui import QButtonGroup |
12 |
12 |
13 from E5Gui.E5Completers import E5FileCompleter |
13 from E5Gui.E5Completers import E5FileCompleter |
|
14 from E5Gui import E5FileDialog |
14 |
15 |
15 from .ConfigurationPageBase import ConfigurationPageBase |
16 from .ConfigurationPageBase import ConfigurationPageBase |
16 from .Ui_HelpViewersPage import Ui_HelpViewersPage |
17 from .Ui_HelpViewersPage import Ui_HelpViewersPage |
17 |
18 |
18 import Preferences |
19 import Preferences |
70 @pyqtSlot() |
71 @pyqtSlot() |
71 def on_customViewerSelectionButton_clicked(self): |
72 def on_customViewerSelectionButton_clicked(self): |
72 """ |
73 """ |
73 Private slot to handle the custom viewer selection. |
74 Private slot to handle the custom viewer selection. |
74 """ |
75 """ |
75 file = QFileDialog.getOpenFileName( |
76 file = E5FileDialog.getOpenFileName( |
76 self, |
77 self, |
77 self.trUtf8("Select Custom Viewer"), |
78 self.trUtf8("Select Custom Viewer"), |
78 self.customViewerEdit.text(), |
79 self.customViewerEdit.text(), |
79 "", |
80 "") |
80 QFileDialog.DontUseNativeDialog) |
|
81 |
81 |
82 if file: |
82 if file: |
83 self.customViewerEdit.setText(Utilities.toNativeSeparators(file)) |
83 self.customViewerEdit.setText(Utilities.toNativeSeparators(file)) |
84 |
84 |
85 @pyqtSlot() |
85 @pyqtSlot() |
86 def on_webbrowserButton_clicked(self): |
86 def on_webbrowserButton_clicked(self): |
87 """ |
87 """ |
88 Private slot to handle the Web browser selection. |
88 Private slot to handle the Web browser selection. |
89 """ |
89 """ |
90 file = QFileDialog.getOpenFileName( |
90 file = E5FileDialog.getOpenFileName( |
91 self, |
91 self, |
92 self.trUtf8("Select Web-Browser"), |
92 self.trUtf8("Select Web-Browser"), |
93 self.webbrowserEdit.text(), |
93 self.webbrowserEdit.text(), |
94 "", |
94 "") |
95 QFileDialog.DontUseNativeDialog) |
|
96 |
95 |
97 if file: |
96 if file: |
98 self.webbrowserEdit.setText(Utilities.toNativeSeparators(file)) |
97 self.webbrowserEdit.setText(Utilities.toNativeSeparators(file)) |
99 |
98 |
100 @pyqtSlot() |
99 @pyqtSlot() |
101 def on_pdfviewerButton_clicked(self): |
100 def on_pdfviewerButton_clicked(self): |
102 """ |
101 """ |
103 Private slot to handle the PDF viewer selection. |
102 Private slot to handle the PDF viewer selection. |
104 """ |
103 """ |
105 file = QFileDialog.getOpenFileName( |
104 file = E5FileDialog.getOpenFileName( |
106 self, |
105 self, |
107 self.trUtf8("Select PDF-Viewer"), |
106 self.trUtf8("Select PDF-Viewer"), |
108 self.pdfviewerEdit.text(), |
107 self.pdfviewerEdit.text(), |
109 "", |
108 "") |
110 QFileDialog.DontUseNativeDialog) |
|
111 |
109 |
112 if file: |
110 if file: |
113 self.pdfviewerEdit.setText(Utilities.toNativeSeparators(file)) |
111 self.pdfviewerEdit.setText(Utilities.toNativeSeparators(file)) |
114 |
112 |
115 @pyqtSlot() |
113 @pyqtSlot() |
116 def on_chmviewerButton_clicked(self): |
114 def on_chmviewerButton_clicked(self): |
117 """ |
115 """ |
118 Private slot to handle the CHM viewer selection. |
116 Private slot to handle the CHM viewer selection. |
119 """ |
117 """ |
120 file = QFileDialog.getOpenFileName( |
118 file = E5FileDialog.getOpenFileName( |
121 self, |
119 self, |
122 self.trUtf8("Select CHM-Viewer"), |
120 self.trUtf8("Select CHM-Viewer"), |
123 self.chmviewerEdit.text(), |
121 self.chmviewerEdit.text(), |
124 "", |
122 "") |
125 QFileDialog.DontUseNativeDialog) |
|
126 |
123 |
127 if file: |
124 if file: |
128 self.chmviewerEdit.setText(Utilities.toNativeSeparators(file)) |
125 self.chmviewerEdit.setText(Utilities.toNativeSeparators(file)) |
129 |
126 |
130 def create(dlg): |
127 def create(dlg): |