# class KReplaceDialog

###

Module | kdeui
Namespace |
Class | KReplaceDialog
Inherits | KFindDialog

A generic "replace" dialog.

Author S.R.Haque <srhaque@iee.org>

Detail:

This widget inherits from KFindDialog and implements the following additional functionalities: a replacement string object and an area for a user-defined widget to extend the dialog.

Example:

To use the basic replace dialog:

To use your own extensions:

### enums

- Options { PromptOnReplace, BackReference }

enum details

### methods

- KReplaceDialog (parent, options, findStrings, replaceStrings, hasSelection)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  parent | QWidget | 0
  options | long | 0
  findStrings | QStringList | QStringList()
  replaceStrings | QStringList | QStringList()
  hasSelection | bool | 1

  Construct a replace dialog.read-only or rather select-only combo box with a parent object and a name.

  parent - The parent object of this widget

  options - A bitfield of the Options to be enabled.

  findStrings - A QStringList to insert in the combo box of text to find

  replaceStrings - A QStringList to insert in the combo box of text to replace with

  hasSelection - Whether a selection exists

- KReplaceDialog (a0, a1, a2, a3, a4)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | QWidget | 0
  a1 | long | 0
  a2 | QStringList | QStringList()
  a3 | QStringList | QStringList()
  a4 | bool | 1

- options ( )

  returns long

  Returns the state of the options. Disabled options may be returned in an indeterminate state.

  See also setOptions

- replaceExtension ( )

  returns QWidget

  Returns an empty widget which the user may fill with additional UI elements as required. The widget occupies the width of the dialog, and is positioned immediately the regular expression support widgets for the replacement string.

- replacement ( )

  returns QString

  Returns the replacement string.

- replacementHistory ( )

  returns QStringList

  Returns the list of history items.

  See also setReplacementHistory

- setOptions (options)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  options | long |

  Set the options which are enabled.

  options - The setting of the Options.

- setReplacementHistory (history)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  history | QStringList |

  Provide the list of strings to be displayed as the history of replacement strings. strings might get truncated if it is too long.

  history - The replacement history.

  See also replacementHistory

- showEvent (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | QShowEvent |

### enums - detail

- Options { PromptOnReplace, BackReference }

  | PromptOnReplace | - 256 | - |
  | BackReference | - 512 | - |