class KFindDialog

# class KFindDialog | A generic "find" dialog. More...
Definition | `#include <kfinddialog.h>`
Inherits | KDialogBase (kdeui) [public ]
Inherited by | KReplaceDialog
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Types

- enum Options { WholeWordsOnly = 1, FromCursor = 2, SelectedText = 4, CaseSensitive = 8, FindBackwards = 16, RegularExpression = 32, MinimumUserOption = 65536 }

#### Public Methods

- KFindDialog ( QWidget *parent = 0, const char *name = 0, long options = 0, const QStringList &findStrings = QStringList(), bool hasSelection = false )
- virtual ~KFindDialog ()
- void setFindHistory ( const QStringList &strings )
- QStringList findHistory () const
- void setHasSelection ( bool hasSelection )
- void setHasCursor ( bool hasCursor )
- void setOptions ( long options )
- long options () const
- QString pattern () const
- void setPattern ( const QString &pattern )
- QWidget * findExtension ()

#### Signals

- void okClicked ()

#### Protected Methods

- virtual void showEvent ( QShowEvent * )

#### Protected Slots

- void slotOk ()
- void slotSelectedTextToggled (bool)
- void showPatterns ()
- void showPlaceholders ()
- void textSearchChanged ( const QString &)

## Detailed Description

### Detail

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

### Example

To use the basic find dialog:

      KFindDialog dlg(....)
      if ( dlg.exec() != QDialog::Accepted )
          return;

      // proceed with KFind from here

To use your own extensions:

enum Options { WholeWordsOnly = 1, FromCursor = 2, SelectedText = 4, CaseSensitive = 8, FindBackwards = 16, RegularExpression = 32, MinimumUserOption = 65536 } | ### Options

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

Construct a find dialog 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.
findStrings | The find history, see findHistory()
hasSelection | Whether a selection exists

~KFindDialog () | ### ~KFindDialog

[virtual]

Destructor.

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

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

Parameters:

history | The find history.

See also: findHistory

QStringList findHistory () | ### findHistory

[const]

Returns the list of history items.

See also: setFindHistory

void setHasSelection ( bool hasSelection ) | ### setHasSelection

Enable/disable the 'search in selection' option, depending on whether there actually is a selection.

Parameters:

hasSelection | true if a selection exists

void setHasCursor ( bool hasCursor ) | ### setHasCursor

Hide/show the 'from cursor' option, depending on whether the application implements a cursor.

Parameters:

hasCursor | true if the application features a cursor This is assumed to be the case by default.

void setOptions ( long options ) | ### setOptions

Set the options which are enabled.

Parameters:

options | The setting of the Options.

long options () | ### options

[const]

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

See also: setOptions

QString pattern () | ### pattern

[const]

Returns the pattern to find.

void setPattern ( const QString &pattern ) | ### setPattern

Sets the pattern to find

QWidget * findExtension () | ### findExtension

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 below the regular expression support widgets for the pattern string.

void okClicked () | ### okClicked

[signal]

The OK button was pressed, the pattern was not empty, and if it is supposed to be a regular expression, it is known to be valid.

Reimplemented from KDialogBase.

void slotOk () | ### slotOk

[protected slots slot]

Reimplemented from KDialogBase.

void slotSelectedTextToggled (bool) | ### slotSelectedTextToggled

[protected slots slot]

void showPatterns () | ### showPatterns

[protected slots slot]

void showPlaceholders () | ### showPlaceholders

[protected slots slot]

void textSearchChanged ( const QString &) | ### textSearchChanged

[protected slots slot]

void showEvent ( QShowEvent * ) | ### showEvent

[protected virtual]

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