15 |
15 |
16 import os |
16 import os |
17 import copy |
17 import copy |
18 |
18 |
19 from PyQt5.QtCore import pyqtSlot, QProcess |
19 from PyQt5.QtCore import pyqtSlot, QProcess |
20 from PyQt5.QtWidgets import QDialog |
20 from PyQt5.QtWidgets import QDialog |
21 |
21 |
22 from E5Gui.E5Application import e5App |
22 from E5Gui.E5Application import e5App |
23 from E5Gui import E5FileDialog, E5MessageBox |
23 from E5Gui import E5FileDialog, E5MessageBox |
24 from E5Gui.E5Completers import E5FileCompleter |
24 from E5Gui.E5Completers import E5FileCompleter |
25 |
25 |
247 config = E5FileDialog.getOpenFileName( |
247 config = E5FileDialog.getOpenFileName( |
248 self, |
248 self, |
249 self.tr("Select configuration file"), |
249 self.tr("Select configuration file"), |
250 startWith, |
250 startWith, |
251 self.tr("Configuration Files (*.cfg *.cnf *.rc);;" |
251 self.tr("Configuration Files (*.cfg *.cnf *.rc);;" |
252 "All Files (*)")) |
252 "All Files (*)")) |
253 if config: |
253 if config: |
254 self.configfileEdit.setText(Utilities.toNativeSeparators(config)) |
254 self.configfileEdit.setText(Utilities.toNativeSeparators(config)) |
255 |
255 |
256 @pyqtSlot() |
256 @pyqtSlot() |
257 def on_reportfileButton_clicked(self): |
257 def on_reportfileButton_clicked(self): |
271 if report: |
271 if report: |
272 self.reportfileEdit.setText(Utilities.toNativeSeparators(report)) |
272 self.reportfileEdit.setText(Utilities.toNativeSeparators(report)) |
273 |
273 |
274 def accept(self): |
274 def accept(self): |
275 """ |
275 """ |
276 Protected slot called by the Ok button. |
276 Public slot called by the Ok button. |
277 |
277 |
278 It saves the values in the parameters dictionary. |
278 It saves the values in the parameters dictionary. |
279 """ |
279 """ |
280 # get data of general tab |
280 # get data of general tab |
281 self.parameters['configFile'] = self.configfileEdit.text() |
281 self.parameters['configFile'] = self.configfileEdit.text() |