44 |
44 |
45 self.findHistory = [] |
45 self.findHistory = [] |
46 self.havefound = False |
46 self.havefound = False |
47 self.__findBackwards = False |
47 self.__findBackwards = False |
48 |
48 |
49 self.findtextCombo.lineEdit().returnPressed.connect(self.__findByReturnPressed) |
49 self.findtextCombo.lineEdit().returnPressed.connect( |
50 self.findtextCombo.lineEdit().textEdited.connect(self.__searchTextEdited) |
50 self.__findByReturnPressed) |
|
51 self.findtextCombo.lineEdit().textEdited.connect( |
|
52 self.__searchTextEdited) |
51 |
53 |
52 if hasattr(QWebPage, "HighlightAllOccurrences"): |
54 if hasattr(QWebPage, "HighlightAllOccurrences"): |
53 self.highlightAllCheckBox.setChecked(True) |
55 self.highlightAllCheckBox.setChecked(True) |
54 else: |
56 else: |
55 self.highlightAllCheckBox.setVisible(False) |
57 self.highlightAllCheckBox.setVisible(False) |
65 |
67 |
66 def __searchTextEdited(self, txt): |
68 def __searchTextEdited(self, txt): |
67 """ |
69 """ |
68 Private slot to perform an incremental search. |
70 Private slot to perform an incremental search. |
69 |
71 |
70 @param txt current text of the search combos line edit (string) (unused) |
72 @param txt current text of the search combos line edit (string) |
|
73 (unused) |
71 """ |
74 """ |
72 self.on_highlightAllCheckBox_toggled(True) |
75 self.on_highlightAllCheckBox_toggled(True) |
73 self.__findNextPrev() |
76 self.__findNextPrev() |
74 |
77 |
75 def __findNextPrev(self): |
78 def __findNextPrev(self): |
165 |
168 |
166 self.on_findPrevButton_clicked() |
169 self.on_findPrevButton_clicked() |
167 |
170 |
168 def __findByReturnPressed(self): |
171 def __findByReturnPressed(self): |
169 """ |
172 """ |
170 Private slot to handle the returnPressed signal of the findtext combobox. |
173 Private slot to handle the returnPressed signal of the findtext |
|
174 combobox. |
171 """ |
175 """ |
172 if self.__findBackwards: |
176 if self.__findBackwards: |
173 self.on_findPrevButton_clicked() |
177 self.on_findPrevButton_clicked() |
174 else: |
178 else: |
175 self.on_findNextButton_clicked() |
179 self.on_findNextButton_clicked() |