40 @param mode mode of the dialog |
38 @param mode mode of the dialog |
41 @type str (one of 'installer' or 'spec') |
39 @type str (one of 'installer' or 'spec') |
42 @param parent reference to the parent widget |
40 @param parent reference to the parent widget |
43 @type QWidget |
41 @type QWidget |
44 """ |
42 """ |
45 assert mode in ("installer", "spec") |
|
46 |
|
47 super(PyInstallerConfigDialog, self).__init__(parent) |
43 super(PyInstallerConfigDialog, self).__init__(parent) |
48 self.setupUi(self) |
44 self.setupUi(self) |
49 |
45 |
50 self.__project = project |
46 self.__project = project |
51 self.__mode = mode |
47 self.__mode = mode |
53 self.inputFilePicker.setMode(E5PathPickerModes.OpenFileMode) |
49 self.inputFilePicker.setMode(E5PathPickerModes.OpenFileMode) |
54 self.inputFilePicker.setDefaultDirectory( |
50 self.inputFilePicker.setDefaultDirectory( |
55 self.__project.getProjectPath()) |
51 self.__project.getProjectPath()) |
56 if self.__mode == "installer": |
52 if self.__mode == "installer": |
57 self.inputFilePicker.setFilters(self.tr( |
53 self.inputFilePicker.setFilters(self.tr( |
58 "Python Files (*.py *.py2 *.py3);;" |
54 "Python Files (*.py *.py3);;" |
59 "Python GUI Files (*.pyw *.pyw2 *.pyw3);;" |
55 "Python GUI Files (*.pyw *.pyw3);;" |
60 "Spec Files (*.spec);;" |
56 "Spec Files (*.spec);;" |
61 "All Files (*)" |
57 "All Files (*)" |
62 )) |
58 )) |
63 elif self.__mode == "spec": |
59 elif self.__mode == "spec": |
64 self.inputFilePicker.setFilters(self.tr( |
60 self.inputFilePicker.setFilters(self.tr( |
65 "Python Files (*.py *.py2 *.py3);;" |
61 "Python Files (*.py *.py3);;" |
66 "Python GUI Files (*.pyw *.pyw2 *.pyw3);;" |
62 "Python GUI Files (*.pyw *.pyw3);;" |
67 "All Files (*)" |
63 "All Files (*)" |
68 )) |
64 )) |
69 |
65 |
70 self.executableCombo.addItems(executables) |
66 self.executableCombo.addItems(executables) |
71 |
67 |