13 from PyQt5.QtWidgets import QDialogButtonBox, QAbstractButton |
13 from PyQt5.QtWidgets import QDialogButtonBox, QAbstractButton |
14 |
14 |
15 from E5Gui.E5Application import e5App |
15 from E5Gui.E5Application import e5App |
16 from E5Gui import E5MessageBox |
16 from E5Gui import E5MessageBox |
17 |
17 |
18 from Ui_RenameDialog import Ui_RenameDialog |
18 from .Ui_RenameDialog import Ui_RenameDialog |
19 from RefactoringDialogBase import RefactoringDialogBase |
19 from .RefactoringDialogBase import RefactoringDialogBase |
20 |
20 |
21 |
21 |
22 class RenameDialog(RefactoringDialogBase, Ui_RenameDialog): |
22 class RenameDialog(RefactoringDialogBase, Ui_RenameDialog): |
23 """ |
23 """ |
24 Class implementing the Rename dialog. |
24 Class implementing the Rename dialog. |
69 @pyqtSlot(str) |
69 @pyqtSlot(str) |
70 def on_newNameEdit_textChanged(self, text): |
70 def on_newNameEdit_textChanged(self, text): |
71 """ |
71 """ |
72 Private slot to react to changes of the new name. |
72 Private slot to react to changes of the new name. |
73 |
73 |
74 @param text text entered into the edit (string) |
74 @param text text entered into the edit |
|
75 @type str |
75 """ |
76 """ |
76 self.__okButton.setEnabled(text != "") |
77 self.__okButton.setEnabled(text != "") |
77 self.__previewButton.setEnabled(text != "") |
78 self.__previewButton.setEnabled(text != "") |
78 |
79 |
79 @pyqtSlot(QAbstractButton) |
80 @pyqtSlot(QAbstractButton) |
80 def on_buttonBox_clicked(self, button): |
81 def on_buttonBox_clicked(self, button): |
81 """ |
82 """ |
82 Private slot to act on the button pressed. |
83 Private slot to act on the button pressed. |
83 |
84 |
84 @param button reference to the button pressed (QAbstractButton) |
85 @param button reference to the button pressed |
|
86 @type QAbstractButton |
85 """ |
87 """ |
86 if button == self.__previewButton: |
88 if button == self.__previewButton: |
87 self.requestPreview() |
89 self.requestPreview() |
88 elif button == self.__okButton: |
90 elif button == self.__okButton: |
89 self.applyChanges() |
91 self.applyChanges() |