26 @param parent reference to the parent widget (QWidget) |
26 @param parent reference to the parent widget (QWidget) |
27 """ |
27 """ |
28 super(FeedEditDialog, self).__init__(parent) |
28 super(FeedEditDialog, self).__init__(parent) |
29 self.setupUi(self) |
29 self.setupUi(self) |
30 |
30 |
31 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False) |
31 self.buttonBox.button( |
|
32 QDialogButtonBox.StandardButton.Ok).setEnabled(False) |
32 |
33 |
33 self.titleEdit.setText(title) |
34 self.titleEdit.setText(title) |
34 self.urlEdit.setText(urlString) |
35 self.urlEdit.setText(urlString) |
35 |
36 |
36 msh = self.minimumSizeHint() |
37 msh = self.minimumSizeHint() |
49 if urlString: |
50 if urlString: |
50 url = QUrl(urlString) |
51 url = QUrl(urlString) |
51 enable = enable and bool(url.scheme()) |
52 enable = enable and bool(url.scheme()) |
52 enable = enable and bool(url.host()) |
53 enable = enable and bool(url.host()) |
53 |
54 |
54 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(enable) |
55 self.buttonBox.button( |
|
56 QDialogButtonBox.StandardButton.Ok).setEnabled(enable) |
55 |
57 |
56 @pyqtSlot(str) |
58 @pyqtSlot(str) |
57 def on_titleEdit_textChanged(self, txt): |
59 def on_titleEdit_textChanged(self, txt): |
58 """ |
60 """ |
59 Private slot to handle changes of the feed title. |
61 Private slot to handle changes of the feed title. |