class KReplaceDialog

# class KReplaceDialog | A generic "replace" dialog. More...
Definition | `#include <kreplacedialog.h>`
Inherits | KFindDialog [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Types

- enum Options { PromptOnReplace = 256, BackReference = 512 }

#### Public Methods

- KReplaceDialog ( QWidget *parent = 0, const char *name = 0, long options = 0, const QStringList &findStrings = QStringList(), const QStringList &replaceStrings = QStringList(), bool hasSelection = true )
- virtual ~KReplaceDialog ()
- void setReplacementHistory ( const QStringList &strings )
- QStringList replacementHistory () const
- void setOptions ( long options )
- long options () const
- QString replacement () const
- QWidget * replaceExtension ()

#### Protected Slots

- void slotOk ()
- virtual void showEvent ( QShowEvent * )

## Detailed Description

### 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:

enum Options { PromptOnReplace = 256, BackReference = 512 } | ### Options

KReplaceDialog ( QWidget *parent = 0, const char *name = 0, long options = 0, const QStringList &findStrings = QStringList(), const QStringList &replaceStrings = QStringList(), bool hasSelection = true ) | ### KReplaceDialog

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

Parameters:

parent | The parent object of this widget
name | The name of this widget
options | A bitfield of the Options to be enabled.
hasSelection | Whether a selection exists

~KReplaceDialog () | ### ~KReplaceDialog

[virtual]

Destructor.

void setReplacementHistory ( const QStringList &strings ) | ### setReplacementHistory

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

Parameters:

history | The replacement history.

See also: replacementHistory

QStringList replacementHistory () | ### replacementHistory

[const]

Returns the list of history items.

See also: setReplacementHistory

void setOptions ( long options ) | ### setOptions

Set the options which are enabled.

Parameters:

options | The setting of the Options.

Reimplemented from KFindDialog.

long options () | ### options

[const]

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

See also: setOptions

Reimplemented from KFindDialog.

QString replacement () | ### replacement

[const]

Returns the replacement string.

QWidget * replaceExtension () | ### replaceExtension

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.

void slotOk () | ### slotOk

[protected slots slot]

Reimplemented from KFindDialog.

void showEvent ( QShowEvent * ) | ### showEvent

[protected slots virtual slot]

Reimplemented from KFindDialog.

- Author: S.R.Haque
- Generated: root on macppc.ports.openbsd.org on Sat Sep 6 10:38:16 2003, using kdoc 2.0a54.