# class KFindDialog

###

Module | kdeui
Namespace |
Class | KFindDialog
Inherits | KDialog

A generic "find" dialog.

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

Detail:

This widget inherits from KDialog 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 modal find dialog, and then run the search:

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

    // proceed with KFind from here

To create a non-modal find dialog:

    if ( m_findDia )
    KWindowSystem.activateWindow( m_findDia->winId() );
    else
    {
    m_findDia = new KFindDialog(false,...);
    connect( m_findDia, SIGNAL(okClicked()), this, SLOT(findTextNext()) );
    }

Don't forget to delete and reset m_findDia when closed. (But do NOT delete your KFind object at that point, it's needed for "Find Next")

To use your own extensions: see findExtension().

### methods

- KFindDialog (parent, options, findStrings, hasSelection, replaceDialog)

  returns ctor
  KDE 4.1.0 and later only

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

  Construct a modal find dialog

  parent - The parent object of this widget.

  options - A bitfield of the Options to be checked.

  findStrings - The find history, see findHistory()

  hasSelection - Whether a selection exists

- KFindDialog (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 | bool | 0
  a4 | bool | 0

- findExtension ( )

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

- findHistory ( )

  returns QStringList

  Returns the list of history items.

  See also setFindHistory

- options ( )

  returns long

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

  See also setOptions()

  See also KFind.Options

- optionsChanged ( )

  returns Nothing
  SIGNAL ("optionsChanged ()")

  This signal is sent whenever one of the option checkboxes is toggled. Call options() to get the new state of the checkboxes.

- pattern ( )

  returns QString

  Returns the pattern to find.

- setFindHistory (history)

  returns Nothing

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

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

  history - The find history.

  See also findHistory

- setHasCursor (hasCursor)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  hasCursor | bool |

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

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

- setHasSelection (hasSelection)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  hasSelection | bool |

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

  hasSelection - true if a selection exists

- setOptions (options)

  returns Nothing

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

  Set the options which are checked.

  options - The setting of the Options.

  See also options()

  See also KFind.Options

- setPattern (pattern)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  pattern | QString |

  Sets the pattern to find

- setSupportsBackwardsFind (supports)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  supports | bool |

  Enable/disable the 'Find backwards' option, depending on whether the application supports it.

  supports - true if the application supports backwards find This is assumed to be the case by default.

- setSupportsCaseSensitiveFind (supports)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  supports | bool |

  Enable/disable the 'Case sensitive' option, depending on whether the application supports it.

  supports - true if the application supports case sensitive find This is assumed to be the case by default.

- setSupportsRegularExpressionFind (supports)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  supports | bool |

  Enable/disable the 'Regular expression' option, depending on whether the application supports it.

  supports - true if the application supports regular expression find This is assumed to be the case by default.

- setSupportsWholeWordsFind (supports)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  supports | bool |

  Enable/disable the 'Whole words only' option, depending on whether the application supports it.

  supports - true if the application supports whole words only find This is assumed to be the case by default.

- showEvent (a0)

  returns Nothing

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