IFindSupport Class
class Core::IFindSupportThe IFindSupport class provides functions for searching in a document or widget. More...
Header: | #include <coreplugin/find/ifindsupport.h> |
Inherits: | QObject |
Inherited By: |
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, Utils::FindFlags findFlags) = 0 |
virtual Core::IFindSupport::Result | findStep(const QString &txt, Utils::FindFlags findFlags) = 0 |
virtual void | highlightAll(const QString &txt, Utils::FindFlags findFlags) |
virtual void | replace(const QString &before, const QString &after, Utils::FindFlags findFlags) |
virtual int | replaceAll(const QString &before, const QString &after, Utils::FindFlags findFlags) |
virtual bool | replaceStep(const QString &before, const QString &after, Utils::FindFlags findFlags) |
virtual void | resetIncrementalSearch() = 0 |
virtual void | selectAll(const QString &txt, Utils::FindFlags findFlags) |
virtual Utils::FindFlags | supportedFindFlags() const = 0 |
virtual bool | supportsReplace() const = 0 |
virtual bool | supportsSelectAll() const |
Signals
void | changed() |
Static Public Members
void | showWrapIndicator(QWidget *parent) |
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, Utils::FindFlags findFlags)
Performs an incremental search of the search term txt using findFlags.
[pure virtual]
Core::IFindSupport::Result IFindSupport::findStep(const QString &txt, Utils::FindFlags findFlags)
Searches for txt using findFlags.
[virtual]
void IFindSupport::highlightAll(const QString &txt, Utils::FindFlags findFlags)
Highlights all search hits for txt when using findFlags.
[virtual]
void IFindSupport::replace(const QString &before, const QString &after, Utils::FindFlags findFlags)
Replaces before with after as specified by findFlags.
[virtual]
int IFindSupport::replaceAll(const QString &before, const QString &after, Utils::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, Utils::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, Utils::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]
Utils::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 Uitls::FindBackward, Utils::FindCaseSensitively, Uitls::FindRegularExpression, Uitls::FindWholeWords, and Uitls::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.
Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.