# eric4.Helpviewer.SearchWidget

Module implementing the search bar for the web browser.

### Global Attributes

None

### Classes

SearchWidget | Class implementing the search bar for the web browser.

### Functions

None

## SearchWidget

Class implementing the search bar for the web browser.

### Derived from

QWidget, Ui_SearchWidget

### Class Attributes

None

### Methods

SearchWidget | Constructor
__findByReturnPressed | Private slot to handle the returnPressed signal of the findtext combobox.
__findNextPrev | Private slot to find the next occurrence of text.
__setFindtextComboBackground | Private slot to change the findtext combo background to indicate errors.
findNext | Public slot to find the next occurrence.
findPrevious | Public slot to find the previous occurrence.
keyPressEvent | Protected slot to handle key press events.
on_closeButton_clicked | Private slot to close the widget.
on_findNextButton_clicked | Private slot to find the next occurrence.
on_findPrevButton_clicked | Private slot to find the previous occurrence.
on_findtextCombo_editTextChanged | Private slot to enable/disable the find buttons.
showFind | Public method to display this dialog.

#### SearchWidget (Constructor)

SearchWidget(mainWindow, parent = None)

Constructor

mainWindow
  reference to the main window (QMainWindow)
parent
  parent widget of this dialog (QWidget)

#### SearchWidget.__findByReturnPressed

__findByReturnPressed()

Private slot to handle the returnPressed signal of the findtext combobox.

#### SearchWidget.__findNextPrev

__findNextPrev()

Private slot to find the next occurrence of text.

#### SearchWidget.__setFindtextComboBackground

__setFindtextComboBackground(error)

Private slot to change the findtext combo background to indicate errors.

error
  flag indicating an error condition (boolean)

#### SearchWidget.findNext

findNext()

Public slot to find the next occurrence.

#### SearchWidget.findPrevious

findPrevious()

Public slot to find the previous occurrence.

#### SearchWidget.keyPressEvent

keyPressEvent(event)

Protected slot to handle key press events.

event
  reference to the key press event (QKeyEvent)

#### SearchWidget.on_closeButton_clicked

on_closeButton_clicked()

Private slot to close the widget.

#### SearchWidget.on_findNextButton_clicked

on_findNextButton_clicked()

Private slot to find the next occurrence.

#### SearchWidget.on_findPrevButton_clicked

on_findPrevButton_clicked()

Private slot to find the previous occurrence.

#### SearchWidget.on_findtextCombo_editTextChanged

on_findtextCombo_editTextChanged(txt)

Private slot to enable/disable the find buttons.

#### SearchWidget.showFind

showFind()

Public method to display this dialog.

Up