40 self.noCacheList.setModel(self.__proxyModel) |
40 self.noCacheList.setModel(self.__proxyModel) |
41 |
41 |
42 self.searchEdit.textChanged.connect( |
42 self.searchEdit.textChanged.connect( |
43 self.__proxyModel.setFilterFixedString) |
43 self.__proxyModel.setFilterFixedString) |
44 |
44 |
45 self.removeButton.clicked[()].connect(self.noCacheList.removeSelected) |
45 self.removeButton.clicked.connect(self.noCacheList.removeSelected) |
46 self.removeAllButton.clicked[()].connect(self.noCacheList.removeAll) |
46 self.removeAllButton.clicked.connect(self.noCacheList.removeAll) |
47 |
47 |
48 @pyqtSlot() |
48 @pyqtSlot() |
49 def on_addButton_clicked(self): |
49 def on_addButton_clicked(self): |
50 """ |
50 """ |
51 Private slot to add an entry to the list. |
51 Private slot to add an entry to the list. |
52 """ |
52 """ |
53 host, ok = QInputDialog.getText( |
53 host, ok = QInputDialog.getText( |
54 self, |
54 self, |
55 self.trUtf8("Not Cached Hosts"), |
55 self.tr("Not Cached Hosts"), |
56 self.trUtf8("Enter host name to add to the list:"), |
56 self.tr("Enter host name to add to the list:"), |
57 QLineEdit.Normal) |
57 QLineEdit.Normal) |
58 if ok and host != "" and host not in self.__model.stringList(): |
58 if ok and host != "" and host not in self.__model.stringList(): |
59 self.__model.insertRow(self.__model.rowCount()) |
59 self.__model.insertRow(self.__model.rowCount()) |
60 self.__model.setData( |
60 self.__model.setData( |
61 self.__model.index(self.__model.rowCount() - 1), host) |
61 self.__model.index(self.__model.rowCount() - 1), host) |