32 def __init__(self, dialogVariant, parent=None): |
32 def __init__(self, dialogVariant, parent=None): |
33 """ |
33 """ |
34 Constructor |
34 Constructor |
35 |
35 |
36 @param dialogVariant variant of the file dialog to be generated |
36 @param dialogVariant variant of the file dialog to be generated |
37 (-1 = E5FileDialog, 0 = unknown, 4 = PyQt4, 5 = PyQt5) |
37 (-1 = E5FileDialog, 0 = unknown, 5 = PyQt5) |
38 @type int |
38 @type int |
39 @param parent parent widget |
39 @param parent parent widget |
40 @type QWidget |
40 @type QWidget |
41 """ |
41 """ |
42 super(FileDialogWizardDialog, self).__init__(parent) |
42 super(FileDialogWizardDialog, self).__init__(parent) |
69 self.pyqtComboBox.addItems(["eric"]) |
69 self.pyqtComboBox.addItems(["eric"]) |
70 self.setWindowTitle(self.tr("E5FileDialog Wizard")) |
70 self.setWindowTitle(self.tr("E5FileDialog Wizard")) |
71 self.pyqtComboBox.setCurrentIndex(0) |
71 self.pyqtComboBox.setCurrentIndex(0) |
72 self.pyqtComboBox.setEnabled(False) |
72 self.pyqtComboBox.setEnabled(False) |
73 else: |
73 else: |
74 self.pyqtComboBox.addItems(["PyQt5", "PyQt4"]) |
74 self.pyqtComboBox.addItems(["PyQt5"]) |
75 self.setWindowTitle(self.tr("QFileDialog Wizard")) |
75 self.setWindowTitle(self.tr("QFileDialog Wizard")) |
76 if self.__dialogVariant == 5: |
76 if self.__dialogVariant == 5: |
77 self.pyqtComboBox.setCurrentIndex(0) |
77 self.pyqtComboBox.setCurrentIndex(0) |
78 elif self.__dialogVariant == 4: |
78 elif self.__dialogVariant == 4: |
79 self.pyqtComboBox.setCurrentIndex(1) |
79 self.pyqtComboBox.setCurrentIndex(1) |
111 """ |
111 """ |
112 Private slot to setup the dialog for the selected PyQt variant. |
112 Private slot to setup the dialog for the selected PyQt variant. |
113 |
113 |
114 @param txt text of the selected combo box entry (string) |
114 @param txt text of the selected combo box entry (string) |
115 """ |
115 """ |
116 self.rfOpenFile.setEnabled(txt in ("eric", "PyQt4")) |
116 self.rfOpenFile.setEnabled(txt == "eric") |
117 self.rfOpenFiles.setEnabled(txt in ("eric", "PyQt4")) |
117 self.rfOpenFiles.setEnabled(txt == "eric") |
118 self.rfSaveFile.setEnabled(txt in ("eric", "PyQt4")) |
118 self.rfSaveFile.setEnabled(txt == "eric") |
119 |
119 |
120 self.rOpenFileUrl.setEnabled(txt == "PyQt5") |
120 self.rOpenFileUrl.setEnabled(txt == "PyQt5") |
121 self.rOpenFileUrls.setEnabled(txt == "PyQt5") |
121 self.rOpenFileUrls.setEnabled(txt == "PyQt5") |
122 self.rSaveFileUrl.setEnabled(txt == "PyQt5") |
122 self.rSaveFileUrl.setEnabled(txt == "PyQt5") |
123 self.rDirectoryUrl.setEnabled(txt == "PyQt5") |
123 self.rDirectoryUrl.setEnabled(txt == "PyQt5") |
362 |
360 |
363 self.urlPropertiesGroup.setEnabled(checkedId in (21, 22, 23, 31)) |
361 self.urlPropertiesGroup.setEnabled(checkedId in (21, 22, 23, 31)) |
364 |
362 |
365 def getCode(self, indLevel, indString): |
363 def getCode(self, indLevel, indString): |
366 """ |
364 """ |
367 Public method to get the source code for Qt4 and Qt5. |
365 Public method to get the source code for Qt5. |
368 |
366 |
369 @param indLevel indentation level (int) |
367 @param indLevel indentation level (int) |
370 @param indString string used for indentation (space or tab) (string) |
368 @param indString string used for indentation (space or tab) (string) |
371 @return generated code (string) |
369 @return generated code (string) |
372 """ |
370 """ |