Plugins/WizardPlugins/FileDialogWizard/FileDialogWizardDialog.py

changeset 3656
441956d8fce5
parent 3484
645c12de6b0c
child 3858
4f4684967fee
equal deleted inserted replaced
3654:ffeb85cdc72d 3656:441956d8fce5
9 9
10 from __future__ import unicode_literals 10 from __future__ import unicode_literals
11 11
12 import os 12 import os
13 13
14 from PyQt4.QtCore import pyqtSlot 14 from PyQt5.QtCore import pyqtSlot
15 from PyQt4.QtGui import QDialog, QDialogButtonBox, QFileDialog, QButtonGroup 15 from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QFileDialog, \
16 QButtonGroup
16 17
17 from E5Gui.E5Completers import E5FileCompleter, E5DirCompleter 18 from E5Gui.E5Completers import E5FileCompleter, E5DirCompleter
18 19
19 from .Ui_FileDialogWizardDialog import Ui_FileDialogWizardDialog 20 from .Ui_FileDialogWizardDialog import Ui_FileDialogWizardDialog
20 21
54 self.__typeButtonsGroup.addButton(self.rDirectory, 20) 55 self.__typeButtonsGroup.addButton(self.rDirectory, 20)
55 self.__typeButtonsGroup.buttonClicked[int].connect( 56 self.__typeButtonsGroup.buttonClicked[int].connect(
56 self.__toggleInitialFilterAndResult) 57 self.__toggleInitialFilterAndResult)
57 self.__toggleInitialFilterAndResult(1) 58 self.__toggleInitialFilterAndResult(1)
58 59
59 self.pyqtComboBox.addItems(["PyQt4", "PyQt5"]) 60 self.pyqtComboBox.addItems(["PyQt5", "PyQt5"])
60 if self.__pyqtVariant == 5: 61 if self.__pyqtVariant == 5:
61 self.pyqtComboBox.setCurrentIndex(1) 62 self.pyqtComboBox.setCurrentIndex(1)
62 else: 63 else:
63 self.pyqtComboBox.setCurrentIndex(0) 64 self.pyqtComboBox.setCurrentIndex(0)
64 65
91 """ 92 """
92 Private slot to setup the dialog for the selected PyQt variant. 93 Private slot to setup the dialog for the selected PyQt variant.
93 94
94 @param txt text of the selected combo box entry (string) 95 @param txt text of the selected combo box entry (string)
95 """ 96 """
96 self.rfOpenFile.setEnabled(txt == "PyQt4") 97 self.rfOpenFile.setEnabled(txt == "PyQt5")
97 self.rfOpenFiles.setEnabled(txt == "PyQt4") 98 self.rfOpenFiles.setEnabled(txt == "PyQt5")
98 self.rfSaveFile.setEnabled(txt == "PyQt4") 99 self.rfSaveFile.setEnabled(txt == "PyQt5")
99 100
100 if txt == "PyQt5": 101 if txt == "PyQt5":
101 if self.rfOpenFile.isChecked(): 102 if self.rfOpenFile.isChecked():
102 self.rOpenFile.setChecked(True) 103 self.rOpenFile.setChecked(True)
103 elif self.rfOpenFiles.isChecked(): 104 elif self.rfOpenFiles.isChecked():

eric ide

mercurial