# eric4.QScintilla.SearchReplaceDialog

Module implementing the search and replace dialog.

### Classes

SearchReplaceDialog | Class implementing the search and replace dialog.

### Functions

None

## SearchReplaceDialog

Class implementing the search and replace dialog.

### Derived from

QDialog

### Methods

SearchReplaceDialog | Constructor
__findNextPrev | Private method to find the next occurrence of the search text.
__markOccurrences | Private method to mark all occurrences of the search text.
__showFind | Private method to display this dialog in find mode.
__showReplace | Private slot to display this dialog in replace mode.
closeEvent | Private event handler for the close event.
findNext | Public slot to find the next occurrence of text.
findPrev | Public slot to find the next previous of text.
hideEvent | Private event handler for the hide event.
on_findNextButton_clicked | Private slot to find the next occurrence of text.
on_findPrevButton_clicked | Private slot to find the previous occurrence of text.
on_findtextCombo_editTextChanged | Private slot to enable/disable the find buttons.
on_replaceAllButton_clicked | Private slot to replace all occurrences of text.
on_replaceButton_clicked | Private slot to replace one occurrence of text.
show | Overridden slot from QDialog.

#### SearchReplaceDialog (Constructor)

SearchReplaceDialog(replace, vm, parent = None)

Constructor

replace
  flag indicating a replace dialog is called
vm
  reference to the viewmanager object
parent
  parent widget of this dialog (QWidget)

#### SearchReplaceDialog.__findNextPrev

__findNextPrev(txt, backwards)

Private method to find the next occurrence of the search text.

txt
  text to search for (QString)
backwards
  flag indicating a backwards search (boolean)

Returns:
  flag indicating success (boolean)

#### SearchReplaceDialog.__markOccurrences

__markOccurrences(txt)

Private method to mark all occurrences of the search text.

txt
  text to search for (QString)

#### SearchReplaceDialog.__showFind

__showFind(text='')

Private method to display this dialog in find mode.

text
  text to be shown in the findtext edit

#### SearchReplaceDialog.__showReplace

__showReplace(text='')

Private slot to display this dialog in replace mode.

text
  text to be shown in the findtext edit

#### SearchReplaceDialog.closeEvent

closeEvent(event)

Private event handler for the close event.

event
  close event (QCloseEvent)

#### SearchReplaceDialog.findNext

findNext()

Public slot to find the next occurrence of text.

#### SearchReplaceDialog.findPrev

findPrev()

Public slot to find the next previous of text.

#### SearchReplaceDialog.hideEvent

hideEvent(event)

Private event handler for the hide event.

event
  close event (QHideEvent)

#### SearchReplaceDialog.on_findNextButton_clicked

on_findNextButton_clicked()

Private slot to find the next occurrence of text.

#### SearchReplaceDialog.on_findPrevButton_clicked

on_findPrevButton_clicked()

Private slot to find the previous occurrence of text.

#### SearchReplaceDialog.on_findtextCombo_editTextChanged

on_findtextCombo_editTextChanged(txt)

Private slot to enable/disable the find buttons.

#### SearchReplaceDialog.on_replaceAllButton_clicked

on_replaceAllButton_clicked()

Private slot to replace all occurrences of text.

#### SearchReplaceDialog.on_replaceButton_clicked

on_replaceButton_clicked()

Private slot to replace one occurrence of text.

#### SearchReplaceDialog.show

show(text = '')

Overridden slot from QDialog.

text
  text to be shown in the findtext edit

Up