56 self.__okButton = self.buttonBox.button(QDialogButtonBox.Ok) |
56 self.__okButton = self.buttonBox.button(QDialogButtonBox.Ok) |
57 self.__okButton.setEnabled(False) |
57 self.__okButton.setEnabled(False) |
58 self.__previewButton = self.buttonBox.addButton( |
58 self.__previewButton = self.buttonBox.addButton( |
59 self.tr("Preview"), QDialogButtonBox.ActionRole) |
59 self.tr("Preview"), QDialogButtonBox.ActionRole) |
60 self.__previewButton.setDefault(True) |
60 self.__previewButton.setDefault(True) |
|
61 self.__previewButton.setEnabled(False) |
61 |
62 |
62 self.newNameEdit.setText(selectedText) |
63 self.newNameEdit.setText(selectedText) |
63 self.newNameEdit.selectAll() |
64 self.newNameEdit.selectAll() |
64 |
65 |
65 msh = self.minimumSizeHint() |
66 msh = self.minimumSizeHint() |
71 Private slot to react to changes of the new name. |
72 Private slot to react to changes of the new name. |
72 |
73 |
73 @param text text entered into the edit (string) |
74 @param text text entered into the edit (string) |
74 """ |
75 """ |
75 self.__okButton.setEnabled(text != "") |
76 self.__okButton.setEnabled(text != "") |
|
77 self.__previewButton.setEnabled(text != "") |
76 |
78 |
77 @pyqtSlot(QAbstractButton) |
79 @pyqtSlot(QAbstractButton) |
78 def on_buttonBox_clicked(self, button): |
80 def on_buttonBox_clicked(self, button): |
79 """ |
81 """ |
80 Private slot to act on the button pressed. |
82 Private slot to act on the button pressed. |