The text searcher is a class to remember the current search operation It remembers the current searchTerm that is used for searching The textsearcher component has got several option. Like case sensitivity regular expressions etc.
More...
#include <textsearcher.h>
The text searcher is a class to remember the current search operation It remembers the current searchTerm that is used for searching The textsearcher component has got several option. Like case sensitivity regular expressions etc.
◆ SyntaxType
Enumerator |
---|
SyntaxPlainString | |
SyntaxRegExp | |
◆ TextSearcher()
edbee::TextSearcher::TextSearcher |
( |
QObject * |
parent = 0 | ) |
|
|
explicit |
◆ ~TextSearcher()
edbee::TextSearcher::~TextSearcher |
( |
| ) |
|
|
virtual |
destroys the textsearcher
◆ createRegExp()
RegExp * edbee::TextSearcher::createRegExp |
( |
| ) |
|
|
protected |
Creates a regular expression for the current selected options.
- Returns
- the new regular expression
◆ findNext() [1/2]
bool edbee::TextSearcher::findNext |
( |
TextRangeSet * |
selection | ) |
|
Finds the next item based on the given caret position in the selection.
- Parameters
-
selection | the selection to use for searching |
- Returns
- true if the next selection has been foudn
◆ findNext [2/2]
Finds the next item based on the given caret position in the selection.
- Parameters
-
widget | the widget to find the next item |
◆ findNextRange()
Finds the next matching textrange This method does not alter the textrange selection. It only returns the range of the next match.
- Parameters
-
selection | the text-selection to use |
- Returns
- the textRange with the found text. TextRange::isEmpty() can be called to check if nothing has been found
◆ findPrev() [1/2]
bool edbee::TextSearcher::findPrev |
( |
TextRangeSet * |
selection | ) |
|
Finds the previous item based on the given caret position in the selection.
- Parameters
-
selection | the selection to use and alter |
- Returns
- true if the previous item has been found false if not found
◆ findPrev [2/2]
Finds the previous item based on the given caret position in the selection.
- Parameters
-
widget | the widget to search in |
◆ isCaseSensitive()
bool edbee::TextSearcher::isCaseSensitive |
( |
| ) |
const |
Returns the case sensitivity of the textsearcher.
◆ isReverse()
bool edbee::TextSearcher::isReverse |
( |
| ) |
const |
◆ isWrapAroundEnabled()
bool edbee::TextSearcher::isWrapAroundEnabled |
( |
| ) |
const |
Should the search wrap around the contents of the document.
◆ searchTerm()
QString edbee::TextSearcher::searchTerm |
( |
| ) |
const |
Returns the current active searchterm.
◆ selectAll() [1/2]
bool edbee::TextSearcher::selectAll |
( |
TextRangeSet * |
selection | ) |
|
Select all matching items in the document.
- Parameters
-
selection | the selection to search for |
- Returns
- true if one ore more items are selected false if not found
◆ selectAll [2/2]
Selects all matches of the current item.
- Parameters
-
widget | the widget to search in |
selection | the selection to change |
◆ selectNext() [1/2]
bool edbee::TextSearcher::selectNext |
( |
TextRangeSet * |
selection | ) |
|
Selects the next item that matches the given critaria (Adds an extra selection range )
- Parameters
-
widget | the widget to search in |
selection | the selection to use |
- Returns
- true if the next item has been found false if it hasn't been.
◆ selectNext [2/2]
Selects the next item that matches the given critaria (Adds an extra selection range )
- Parameters
-
widget | the widget to search in |
◆ selectPrev() [1/2]
bool edbee::TextSearcher::selectPrev |
( |
TextRangeSet * |
selection | ) |
|
Selects the previous item based on the given caret position in the selection.
- Parameters
-
selection | the selection to use |
- Returns
- true if the selection has been found false if it hasn't been found
◆ selectPrev [2/2]
Selects the previous item based on the given caret position in the selection.
- Parameters
-
widget | the widget to to search in |
◆ selectUnderExpand
void edbee::TextSearcher::selectUnderExpand |
( |
TextEditorWidget * |
widget, |
|
|
bool |
selectAllTexts |
|
) |
| |
|
slot |
A smart selection: when there's no selection the current word is used and selected. The next word will be selected, if all is specified all words are selected.
- Parameters
-
widget | the widget to select |
selectAllTexts | if true then all occurences are selected |
◆ setCaseSensitive()
void edbee::TextSearcher::setCaseSensitive |
( |
bool |
sensitive | ) |
|
sets the case sensitivity of the search operation
◆ setDirty()
void edbee::TextSearcher::setDirty |
( |
| ) |
|
|
protected |
Marks the regexp as dirty (and deletes it)
◆ setReverse()
void edbee::TextSearcher::setReverse |
( |
bool |
on | ) |
|
Sets the search reverse mode.
◆ setSearchTerm()
void edbee::TextSearcher::setSearchTerm |
( |
const QString & |
term | ) |
|
Sets the current search term.
◆ setSyntax()
Sets the syntax mode of the searcher syntax the SyntaxType to use (SyntaxPlainString, SyntaxRegExp)
◆ setWrapAround()
void edbee::TextSearcher::setWrapAround |
( |
bool |
on | ) |
|
◆ syntax()
Returns the syntax type of the current search operation.
The documentation for this class was generated from the following files: