BaseTextFind Class | Extending Qt Creator Manual

- Extending Qt Creator Manual
- BaseTextFind
- Extending Qt Creator Manual 4.12.3

# BaseTextFind Class

class Core::BaseTextFind

The BaseTextFind class implements a find filter for QPlainTextEdit and QTextEdit based widgets. More...

Header: | #include <BaseTextFind>
Inherits: | Core::IFindSupport

- List of all members, including inherited members

## Reimplemented Public Functions

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

## Signals

void | findScopeChanged(const QTextCursor &start, const QTextCursor &end, int verticalBlockSelectionFirstColumn, int verticalBlockSelectionLastColumn)
void | highlightAllRequested(const QString &txt, Core::FindFlags findFlags)

## Detailed Description

See also Core::IFindFilter.

## Member Function Documentation

### `[signal]` void BaseTextFind::findScopeChanged(const QTextCursor &start, const QTextCursor &end, int verticalBlockSelectionFirstColumn, int verticalBlockSelectionLastColumn)

This signal is emitted when the search scope changes to start, end, verticalBlockSelectionFirstColumn, and verticalBlockSelectionLastColumn.

### `[signal]` void BaseTextFind::highlightAllRequested(const QString &txt, Core::FindFlags findFlags)

This signal is emitted when the search results for txt using the given findFlags should be highlighted in the editor widget.

### `[override virtual]` void BaseTextFind::clearFindScope()

Reimplements: IFindSupport::clearFindScope().

### `[override virtual]` void BaseTextFind::clearHighlights()

Reimplements: IFindSupport::clearHighlights().

### `[override virtual]` QString BaseTextFind::completedFindString() const

Reimplements: IFindSupport::completedFindString() const.

### `[override virtual]` QString BaseTextFind::currentFindString() const

Reimplements: IFindSupport::currentFindString() const.

### `[override virtual]` void BaseTextFind::defineFindScope()

Reimplements: IFindSupport::defineFindScope().

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

Reimplements: IFindSupport::findIncremental(const QString &txt, Core::FindFlags findFlags).

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

Reimplements: IFindSupport::findStep(const QString &txt, Core::FindFlags findFlags).

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

Reimplements: IFindSupport::highlightAll(const QString &txt, Core::FindFlags findFlags).

Emits highlightAllRequested().

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

Reimplements: IFindSupport::replace(const QString &before, const QString &after, Core::FindFlags findFlags).

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

Reimplements: IFindSupport::replaceAll(const QString &before, const QString &after, Core::FindFlags findFlags).

Returns the number of search hits replaced.

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

Reimplements: IFindSupport::replaceStep(const QString &before, const QString &after, Core::FindFlags findFlags).

### `[override virtual]` void BaseTextFind::resetIncrementalSearch()

Reimplements: IFindSupport::resetIncrementalSearch().

### `[override virtual]` Core::FindFlags BaseTextFind::supportedFindFlags() const

Reimplements: IFindSupport::supportedFindFlags() const.

### `[override virtual]` bool BaseTextFind::supportsReplace() const

Reimplements: IFindSupport::supportsReplace() const.