7 Module implementing the Inline dialog. |
7 Module implementing the Inline 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_UseFunctionDialog import Ui_UseFunctionDialog |
15 from Ui_UseFunctionDialog import Ui_UseFunctionDialog |
16 from RefactoringDialogBase import RefactoringDialogBase |
16 from RefactoringDialogBase import RefactoringDialogBase |
17 |
17 |
18 |
18 |
35 self.setupUi(self) |
35 self.setupUi(self) |
36 |
36 |
37 self.__user = user |
37 self.__user = user |
38 |
38 |
39 self.description.setText( |
39 self.description.setText( |
40 self.trUtf8("Using Function <b>{0}</b>.") |
40 self.tr("Using Function <b>{0}</b>.") |
41 .format(self.__user.get_function_name())) |
41 .format(self.__user.get_function_name())) |
42 |
42 |
43 self.__okButton = self.buttonBox.button(QDialogButtonBox.Ok) |
43 self.__okButton = self.buttonBox.button(QDialogButtonBox.Ok) |
44 self.__previewButton = self.buttonBox.addButton( |
44 self.__previewButton = self.buttonBox.addButton( |
45 self.trUtf8("Preview"), QDialogButtonBox.ActionRole) |
45 self.tr("Preview"), QDialogButtonBox.ActionRole) |
46 self.__previewButton.setDefault(True) |
46 self.__previewButton.setDefault(True) |
47 |
47 |
48 msh = self.minimumSizeHint() |
48 msh = self.minimumSizeHint() |
49 self.resize(max(self.width(), msh.width()), msh.height()) |
49 self.resize(max(self.width(), msh.width()), msh.height()) |
50 |
50 |