17 from .ConfigurationPageBase import ConfigurationPageBase |
17 from .ConfigurationPageBase import ConfigurationPageBase |
18 from .Ui_HelpDocumentationPage import Ui_HelpDocumentationPage |
18 from .Ui_HelpDocumentationPage import Ui_HelpDocumentationPage |
19 |
19 |
20 import Preferences |
20 import Preferences |
21 import Utilities |
21 import Utilities |
|
22 import UI.PixmapCache |
22 |
23 |
23 |
24 |
24 class HelpDocumentationPage(ConfigurationPageBase, Ui_HelpDocumentationPage): |
25 class HelpDocumentationPage(ConfigurationPageBase, Ui_HelpDocumentationPage): |
25 """ |
26 """ |
26 Class implementing the Help Documentation configuration page. |
27 Class implementing the Help Documentation configuration page. |
31 """ |
32 """ |
32 super(HelpDocumentationPage, self).__init__() |
33 super(HelpDocumentationPage, self).__init__() |
33 self.setupUi(self) |
34 self.setupUi(self) |
34 self.setObjectName("HelpDocumentationPage") |
35 self.setObjectName("HelpDocumentationPage") |
35 |
36 |
|
37 self.python2DocDirButton.setIcon(UI.PixmapCache.getIcon("open.png")) |
|
38 self.pythonDocDirButton.setIcon(UI.PixmapCache.getIcon("open.png")) |
|
39 self.qt4DocDirButton.setIcon(UI.PixmapCache.getIcon("open.png")) |
|
40 self.qt5DocDirButton.setIcon(UI.PixmapCache.getIcon("open.png")) |
|
41 self.pyqt4DocDirButton.setIcon(UI.PixmapCache.getIcon("open.png")) |
|
42 self.pyqt5DocDirButton.setIcon(UI.PixmapCache.getIcon("open.png")) |
|
43 self.pysideDocDirButton.setIcon(UI.PixmapCache.getIcon("open.png")) |
|
44 |
36 self.python2DocDirCompleter = E5FileCompleter(self.python2DocDirEdit) |
45 self.python2DocDirCompleter = E5FileCompleter(self.python2DocDirEdit) |
37 self.pythonDocDirCompleter = E5FileCompleter(self.pythonDocDirEdit) |
46 self.pythonDocDirCompleter = E5FileCompleter(self.pythonDocDirEdit) |
38 self.qt4DocDirCompleter = E5FileCompleter(self.qt4DocDirEdit) |
47 self.qt4DocDirCompleter = E5FileCompleter(self.qt4DocDirEdit) |
|
48 self.qt5DocDirCompleter = E5FileCompleter(self.qt5DocDirEdit) |
39 self.pyqt4DocDirCompleter = E5FileCompleter(self.pyqt4DocDirEdit) |
49 self.pyqt4DocDirCompleter = E5FileCompleter(self.pyqt4DocDirEdit) |
40 self.pyqt5DocDirCompleter = E5FileCompleter(self.pyqt5DocDirEdit) |
50 self.pyqt5DocDirCompleter = E5FileCompleter(self.pyqt5DocDirEdit) |
41 self.pysideDocDirCompleter = E5FileCompleter(self.pysideDocDirEdit) |
51 self.pysideDocDirCompleter = E5FileCompleter(self.pysideDocDirEdit) |
42 |
52 |
43 try: |
53 try: |
98 """ |
108 """ |
99 Private slot to select the Python 2 documentation directory. |
109 Private slot to select the Python 2 documentation directory. |
100 """ |
110 """ |
101 entry = E5FileDialog.getOpenFileName( |
111 entry = E5FileDialog.getOpenFileName( |
102 self, |
112 self, |
103 self.trUtf8("Select Python 2 documentation entry"), |
113 self.tr("Select Python 2 documentation entry"), |
104 QUrl(self.python2DocDirEdit.text()).path(), |
114 QUrl(self.python2DocDirEdit.text()).path(), |
105 self.trUtf8( |
115 self.tr( |
106 "HTML Files (*.html *.htm);;" |
116 "HTML Files (*.html *.htm);;" |
107 "Compressed Help Files (*.chm);;" |
117 "Compressed Help Files (*.chm);;" |
108 "All Files (*)")) |
118 "All Files (*)")) |
109 |
119 |
110 if entry: |
120 if entry: |
115 """ |
125 """ |
116 Private slot to select the Python 3 documentation directory. |
126 Private slot to select the Python 3 documentation directory. |
117 """ |
127 """ |
118 entry = E5FileDialog.getOpenFileName( |
128 entry = E5FileDialog.getOpenFileName( |
119 self, |
129 self, |
120 self.trUtf8("Select Python 3 documentation entry"), |
130 self.tr("Select Python 3 documentation entry"), |
121 QUrl(self.pythonDocDirEdit.text()).path(), |
131 QUrl(self.pythonDocDirEdit.text()).path(), |
122 self.trUtf8( |
132 self.tr( |
123 "HTML Files (*.html *.htm);;" |
133 "HTML Files (*.html *.htm);;" |
124 "Compressed Help Files (*.chm);;" |
134 "Compressed Help Files (*.chm);;" |
125 "All Files (*)")) |
135 "All Files (*)")) |
126 |
136 |
127 if entry: |
137 if entry: |
132 """ |
142 """ |
133 Private slot to select the Qt4 documentation directory. |
143 Private slot to select the Qt4 documentation directory. |
134 """ |
144 """ |
135 entry = E5FileDialog.getOpenFileName( |
145 entry = E5FileDialog.getOpenFileName( |
136 self, |
146 self, |
137 self.trUtf8("Select Qt4 documentation entry"), |
147 self.tr("Select Qt4 documentation entry"), |
138 QUrl(self.qt4DocDirEdit.text()).path(), |
148 QUrl(self.qt4DocDirEdit.text()).path(), |
139 self.trUtf8("HTML Files (*.html *.htm);;All Files (*)")) |
149 self.tr("HTML Files (*.html *.htm);;All Files (*)")) |
140 |
150 |
141 if entry: |
151 if entry: |
142 self.qt4DocDirEdit.setText(Utilities.toNativeSeparators(entry)) |
152 self.qt4DocDirEdit.setText(Utilities.toNativeSeparators(entry)) |
143 |
153 |
144 @pyqtSlot() |
154 @pyqtSlot() |
146 """ |
156 """ |
147 Private slot to select the Qt5 documentation directory. |
157 Private slot to select the Qt5 documentation directory. |
148 """ |
158 """ |
149 entry = E5FileDialog.getOpenFileName( |
159 entry = E5FileDialog.getOpenFileName( |
150 self, |
160 self, |
151 self.trUtf8("Select Qt5 documentation entry"), |
161 self.tr("Select Qt5 documentation entry"), |
152 QUrl(self.qt5DocDirEdit.text()).path(), |
162 QUrl(self.qt5DocDirEdit.text()).path(), |
153 self.trUtf8("HTML Files (*.html *.htm);;All Files (*)")) |
163 self.tr("HTML Files (*.html *.htm);;All Files (*)")) |
154 |
164 |
155 if entry: |
165 if entry: |
156 self.qt5DocDirEdit.setText(Utilities.toNativeSeparators(entry)) |
166 self.qt5DocDirEdit.setText(Utilities.toNativeSeparators(entry)) |
157 |
167 |
158 @pyqtSlot() |
168 @pyqtSlot() |
160 """ |
170 """ |
161 Private slot to select the PyQt4 documentation directory. |
171 Private slot to select the PyQt4 documentation directory. |
162 """ |
172 """ |
163 entry = E5FileDialog.getOpenFileName( |
173 entry = E5FileDialog.getOpenFileName( |
164 self, |
174 self, |
165 self.trUtf8("Select PyQt4 documentation entry"), |
175 self.tr("Select PyQt4 documentation entry"), |
166 QUrl(self.pyqt4DocDirEdit.text()).path(), |
176 QUrl(self.pyqt4DocDirEdit.text()).path(), |
167 self.trUtf8("HTML Files (*.html *.htm);;All Files (*)")) |
177 self.tr("HTML Files (*.html *.htm);;All Files (*)")) |
168 |
178 |
169 if entry: |
179 if entry: |
170 self.pyqt4DocDirEdit.setText(Utilities.toNativeSeparators(entry)) |
180 self.pyqt4DocDirEdit.setText(Utilities.toNativeSeparators(entry)) |
171 |
181 |
172 @pyqtSlot() |
182 @pyqtSlot() |
174 """ |
184 """ |
175 Private slot to select the PyQt5 documentation directory. |
185 Private slot to select the PyQt5 documentation directory. |
176 """ |
186 """ |
177 entry = E5FileDialog.getOpenFileName( |
187 entry = E5FileDialog.getOpenFileName( |
178 self, |
188 self, |
179 self.trUtf8("Select PyQt5 documentation entry"), |
189 self.tr("Select PyQt5 documentation entry"), |
180 QUrl(self.pyqt4DocDirEdit.text()).path(), |
190 QUrl(self.pyqt4DocDirEdit.text()).path(), |
181 self.trUtf8("HTML Files (*.html *.htm);;All Files (*)")) |
191 self.tr("HTML Files (*.html *.htm);;All Files (*)")) |
182 |
192 |
183 if entry: |
193 if entry: |
184 self.pyqt5DocDirEdit.setText(Utilities.toNativeSeparators(entry)) |
194 self.pyqt5DocDirEdit.setText(Utilities.toNativeSeparators(entry)) |
185 |
195 |
186 @pyqtSlot() |
196 @pyqtSlot() |
188 """ |
198 """ |
189 Private slot to select the PySide documentation directory. |
199 Private slot to select the PySide documentation directory. |
190 """ |
200 """ |
191 entry = E5FileDialog.getOpenFileName( |
201 entry = E5FileDialog.getOpenFileName( |
192 self, |
202 self, |
193 self.trUtf8("Select PySide documentation entry"), |
203 self.tr("Select PySide documentation entry"), |
194 QUrl(self.pysideDocDirEdit.text()).path(), |
204 QUrl(self.pysideDocDirEdit.text()).path(), |
195 self.trUtf8("HTML Files (*.html *.htm);;All Files (*)")) |
205 self.tr("HTML Files (*.html *.htm);;All Files (*)")) |
196 |
206 |
197 if entry: |
207 if entry: |
198 self.pysideDocDirEdit.setText(Utilities.toNativeSeparators(entry)) |
208 self.pysideDocDirEdit.setText(Utilities.toNativeSeparators(entry)) |
199 |
209 |
200 |
210 |