class KFindDialog

A generic "find" dialog. More...

Definition#include <kfinddialog.h>
InheritsKDialogBase (kdeui) [public ]
Inherited byKReplaceDialog
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Types

Public Methods

Signals

Protected Methods

Protected Slots


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:
parentThe parent object of this widget.
nameThe name of this widget.
optionsA bitfield of the Options to be enabled.
findStringsThe find history, see findHistory()
hasSelectionWhether 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:
historyThe 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:
hasSelectiontrue if a selection exists

void  setHasCursor ( bool hasCursor )

setHasCursor

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

Parameters:
hasCursortrue 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:
optionsThe 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

QWidgetfindExtension ()

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]