45 self.havefound = False |
45 self.havefound = False |
46 self.__findBackwards = False |
46 self.__findBackwards = False |
47 |
47 |
48 self.connect(self.findtextCombo.lineEdit(), SIGNAL("returnPressed()"), |
48 self.connect(self.findtextCombo.lineEdit(), SIGNAL("returnPressed()"), |
49 self.__findByReturnPressed) |
49 self.__findByReturnPressed) |
|
50 self.connect(self.findtextCombo.lineEdit(), SIGNAL("textEdited(const QString&)"), |
|
51 self.__searchTextEdited) |
50 |
52 |
51 if hasattr(QWebPage, "HighlightAllOccurrences"): |
53 if hasattr(QWebPage, "HighlightAllOccurrences"): |
52 self.highlightAllCheckBox.setChecked(True) |
54 self.highlightAllCheckBox.setChecked(True) |
53 else: |
55 else: |
54 self.highlightAllCheckBox.setVisible(False) |
56 self.highlightAllCheckBox.setVisible(False) |
59 |
61 |
60 @param txt text of the combobox (string) |
62 @param txt text of the combobox (string) |
61 """ |
63 """ |
62 self.findPrevButton.setEnabled(txt != "") |
64 self.findPrevButton.setEnabled(txt != "") |
63 self.findNextButton.setEnabled(txt != "") |
65 self.findNextButton.setEnabled(txt != "") |
|
66 |
|
67 def __searchTextEdited(self, txt): |
|
68 """ |
|
69 Private slot to perform an incremental search. |
|
70 |
|
71 @param txt current text of the search combos line edit (string) (unused) |
|
72 """ |
64 self.on_highlightAllCheckBox_toggled(True) |
73 self.on_highlightAllCheckBox_toggled(True) |
65 self.__findNextPrev() |
74 self.__findNextPrev() |
66 |
75 |
67 def __findNextPrev(self): |
76 def __findNextPrev(self): |
68 """ |
77 """ |
69 Private slot to find the next occurrence of text. |
78 Private slot to find the next occurrence of text. |
70 """ |
79 """ |
71 self.infoLabel.clear() |
80 self.infoLabel.clear() |