- Extending Qt Creator Manual
- QtCreator
- IFindSupport
- Extending Qt Creator Manual 8.0.2

# IFindSupport Class

class Core::IFindSupport

The IFindSupport class provides functions for searching in a document or widget. More...

Header: | #include <coreplugin/find/ifindsupport.h>
Inherited By: | Core::BaseTextFind

- List of all members, including inherited members

## Public Types

enum | Result { Found, NotFound, NotYetFound }

## Public Functions

virtual void | clearFindScope()
virtual void | clearHighlights() = 0
virtual QString | completedFindString() const = 0
virtual QString | currentFindString() const = 0
virtual void | defineFindScope()
virtual Core::IFindSupport::Result | findIncremental(const QString &txt, Core::FindFlags findFlags) = 0
virtual Core::IFindSupport::Result | findStep(const QString &txt, Core::FindFlags findFlags) = 0
virtual void | highlightAll(const QString &txt, Core::FindFlags findFlags)
virtual void | replace(const QString &before, const QString &after, Core::FindFlags findFlags)
virtual int | replaceAll(const QString &before, const QString &after, Core::FindFlags findFlags)
virtual bool | replaceStep(const QString &before, const QString &after, Core::FindFlags findFlags)
virtual void | resetIncrementalSearch() = 0
virtual void | selectAll(const QString &txt, Core::FindFlags findFlags)
virtual Core::FindFlags | supportedFindFlags() const = 0
virtual bool | supportsReplace() const = 0
virtual bool | supportsSelectAll() const

## Signals

void | changed()

## Static Public Members

void | showWrapIndicator(QWidget *parent)

## Detailed Description

See also Core::BaseTextFind.

## Member Type Documentation

### enum IFindSupport::Result

This enum holds whether the search term was found within the search scope using the find flags.

Constant | Value | Description
--- | --- | ---
`Core::IFindSupport::Found` | `0` | The search term was found.
`Core::IFindSupport::NotFound` | `1` | The search term was not found.
`Core::IFindSupport::NotYetFound` | `2` | The search term has not been found yet.

## Member Function Documentation

### `[signal]` void IFindSupport::changed()

This signal is emitted when the search changes.

### `[virtual]` void IFindSupport::clearFindScope()

Clears the find scope.

### `[pure virtual]` void IFindSupport::clearHighlights()

Clears highlighting of search results in the searched widget.

### `[pure virtual]` QString IFindSupport::completedFindString() const

Returns the complete search string.

### `[pure virtual]` QString IFindSupport::currentFindString() const

Returns the current search string.

### `[virtual]` void IFindSupport::defineFindScope()

Defines the find scope.

### `[pure virtual]` Core::IFindSupport::Result IFindSupport::findIncremental(const QString &txt, Core::FindFlags findFlags)

Performs an incremental search of the search term txt using findFlags.

### `[pure virtual]` Core::IFindSupport::Result IFindSupport::findStep(const QString &txt, Core::FindFlags findFlags)

Searches for txt using findFlags.

### `[virtual]` void IFindSupport::highlightAll(const QString &txt, Core::FindFlags findFlags)

Highlights all search hits for txt when using findFlags.

### `[virtual]` void IFindSupport::replace(const QString &before, const QString &after, Core::FindFlags findFlags)

Replaces before with after as specified by findFlags.

### `[virtual]` int IFindSupport::replaceAll(const QString &before, const QString &after, Core::FindFlags findFlags)

Finds and replaces all instances of before with after as specified by findFlags.

### `[virtual]` bool IFindSupport::replaceStep(const QString &before, const QString &after, Core::FindFlags findFlags)

Replaces before with after as specified by findFlags, and then performs findStep().

Returns whether the find step found another match.

### `[pure virtual]` void IFindSupport::resetIncrementalSearch()

Resets incremental search to start position.

### `[virtual]` void IFindSupport::selectAll(const QString &txt, Core::FindFlags findFlags)

Finds and selects all instances of txt with specified findFlags.

### `[static]` void IFindSupport::showWrapIndicator(QWidget *parent)

Shows parent overlayed with the wrap indicator.

### `[pure virtual]` Core::FindFlags IFindSupport::supportedFindFlags() const

Returns the find flags, such as whole words or regular expressions, that this find filter supports.

Depending on the returned value, the default find option widgets are enabled or disabled.

The default is Core::FindBackward, Core::FindCaseSensitively, Core::FindRegularExpression, Core::FindWholeWords, and Core::FindPreserveCase.

### `[pure virtual]` bool IFindSupport::supportsReplace() const

Returns whether the find filter supports search and replace.

### `[virtual]` bool IFindSupport::supportsSelectAll() const

Returns whether the find filter supports selecting all results.