13 |
13 |
14 from PyQt4.QtCore import * |
14 from PyQt4.QtCore import * |
15 from PyQt4.QtGui import * |
15 from PyQt4.QtGui import * |
16 |
16 |
17 from E5Gui.E5Completers import E5FileCompleter, E5DirCompleter |
17 from E5Gui.E5Completers import E5FileCompleter, E5DirCompleter |
|
18 from E5Gui import E5FileDialog |
18 |
19 |
19 from .Ui_EricapiConfigDialog import Ui_EricapiConfigDialog |
20 from .Ui_EricapiConfigDialog import Ui_EricapiConfigDialog |
20 import Utilities |
21 import Utilities |
21 import DocumentationTools |
22 import DocumentationTools |
22 |
23 |
163 Private slot to select the output file. |
164 Private slot to select the output file. |
164 |
165 |
165 It displays a file selection dialog to |
166 It displays a file selection dialog to |
166 select the file the api is written to. |
167 select the file the api is written to. |
167 """ |
168 """ |
168 filename = QFileDialog.getSaveFileName( |
169 filename = E5FileDialog.getSaveFileName( |
169 self, |
170 self, |
170 self.trUtf8("Select output file"), |
171 self.trUtf8("Select output file"), |
171 self.outputFileEdit.text(), |
172 self.outputFileEdit.text(), |
172 self.trUtf8("API files (*.api);;All files (*)"), |
173 self.trUtf8("API files (*.api);;All files (*)")) |
173 QFileDialog.DontUseNativeDialog) |
|
174 |
174 |
175 if filename: |
175 if filename: |
176 # make it relative, if it is in a subdirectory of the project path |
176 # make it relative, if it is in a subdirectory of the project path |
177 fn = Utilities.toNativeSeparators(filename) |
177 fn = Utilities.toNativeSeparators(filename) |
178 fn = self.project.getRelativePath(fn) |
178 fn = self.project.getRelativePath(fn) |
195 select a directory to be ignored. |
195 select a directory to be ignored. |
196 """ |
196 """ |
197 startDir = self.ignoreDirEdit.text() |
197 startDir = self.ignoreDirEdit.text() |
198 if not startDir: |
198 if not startDir: |
199 startDir = self.ppath |
199 startDir = self.ppath |
200 directory = QFileDialog.getExistingDirectory( |
200 directory = E5FileDialog.getExistingDirectory( |
201 self, |
201 self, |
202 self.trUtf8("Select directory to exclude"), |
202 self.trUtf8("Select directory to exclude"), |
203 startDir, |
203 startDir, |
204 QFileDialog.Options(QFileDialog.ShowDirsOnly | |
204 E5FileDialog.Options(E5FileDialog.ShowDirsOnly)) |
205 QFileDialog.DontUseNativeDialog)) |
|
206 |
205 |
207 if directory: |
206 if directory: |
208 # make it relative, if it is a subdirectory of the project path |
207 # make it relative, if it is a subdirectory of the project path |
209 dn = Utilities.toNativeSeparators(directory) |
208 dn = Utilities.toNativeSeparators(directory) |
210 dn = self.project.getRelativePath(dn) |
209 dn = self.project.getRelativePath(dn) |