7 Module implementing the Move Method dialog. |
7 Module implementing the Move Method dialog. |
8 """ |
8 """ |
9 |
9 |
10 from __future__ import unicode_literals |
10 from __future__ import unicode_literals |
11 |
11 |
12 from PyQt4.QtCore import pyqtSlot |
12 from PyQt5.QtCore import pyqtSlot |
13 from PyQt4.QtGui import QDialogButtonBox, QAbstractButton |
13 from PyQt5.QtWidgets import QDialogButtonBox, QAbstractButton |
14 |
14 |
15 from Ui_MoveMethodDialog import Ui_MoveMethodDialog |
15 from Ui_MoveMethodDialog import Ui_MoveMethodDialog |
16 from RefactoringDialogBase import RefactoringDialogBase |
16 from RefactoringDialogBase import RefactoringDialogBase |
17 |
17 |
18 |
18 |
37 self.__mover = mover |
37 self.__mover = mover |
38 |
38 |
39 self.__okButton = self.buttonBox.button(QDialogButtonBox.Ok) |
39 self.__okButton = self.buttonBox.button(QDialogButtonBox.Ok) |
40 self.__okButton.setEnabled(False) |
40 self.__okButton.setEnabled(False) |
41 self.__previewButton = self.buttonBox.addButton( |
41 self.__previewButton = self.buttonBox.addButton( |
42 self.trUtf8("Preview"), QDialogButtonBox.ActionRole) |
42 self.tr("Preview"), QDialogButtonBox.ActionRole) |
43 self.__previewButton.setDefault(True) |
43 self.__previewButton.setDefault(True) |
44 |
44 |
45 self.methodEdit.setText(self.__mover.get_method_name()) |
45 self.methodEdit.setText(self.__mover.get_method_name()) |
46 self.methodEdit.selectAll() |
46 self.methodEdit.selectAll() |
47 |
47 |