182 self.findtextCombo.setEditText( |
182 self.findtextCombo.setEditText( |
183 self.__mainWindow.currentBrowser().selectedText()) |
183 self.__mainWindow.currentBrowser().selectedText()) |
184 |
184 |
185 self.__setFindtextComboBackground(False) |
185 self.__setFindtextComboBackground(False) |
186 self.show() |
186 self.show() |
187 |
187 |
|
188 def __resetSearch(self): |
|
189 """ |
|
190 Private method to reset the last search. |
|
191 """ |
|
192 self.__mainWindow.currentBrowser().findText("") |
|
193 |
188 @pyqtSlot() |
194 @pyqtSlot() |
189 def on_closeButton_clicked(self): |
195 def on_closeButton_clicked(self): |
190 """ |
196 """ |
191 Private slot to close the widget. |
197 Private slot to close the widget. |
192 """ |
198 """ |
|
199 self.__resetSearch() |
193 self.close() |
200 self.close() |
194 |
201 |
195 def keyPressEvent(self, event): |
202 def keyPressEvent(self, event): |
196 """ |
203 """ |
197 Protected slot to handle key press events. |
204 Protected slot to handle key press events. |
201 if event.key() == Qt.Key_Escape: |
208 if event.key() == Qt.Key_Escape: |
202 cb = self.__mainWindow.currentBrowser() |
209 cb = self.__mainWindow.currentBrowser() |
203 if cb: |
210 if cb: |
204 cb.setFocus(Qt.ActiveWindowFocusReason) |
211 cb.setFocus(Qt.ActiveWindowFocusReason) |
205 event.accept() |
212 event.accept() |
|
213 self.__resetSearch() |
206 self.close() |
214 self.close() |
207 |
215 |
208 def __setFindtextComboBackground(self, error): |
216 def __setFindtextComboBackground(self, error): |
209 """ |
217 """ |
210 Private slot to change the findtext combo background to indicate |
218 Private slot to change the findtext combo background to indicate |