Qx v0.7
Qt Extensions Library
Loading...
Searching...
No Matches
Qx::TextQuery Class Reference

The TextQuery class contains rules for conducting a search of text. More...

#include <qx/io/qx-textquery.h>

Public Member Functions

 TextQuery (const QString &string, Qt::CaseSensitivity cs=Qt::CaseSensitive)
 
bool allowSplit () const
 
Qt::CaseSensitivity caseSensitivity () const
 
int hitLimit () const
 
int hitsToSkip () const
 
void setAllowSplit (bool allowSplit)
 
void setCaseSensitivity (Qt::CaseSensitivity caseSensitivity)
 
void setHitLimit (int hitLimit)
 
void setHitsToSkip (int hitsToSkip)
 
void setStartPosition (TextPos startPosition)
 
void setString (QString string)
 
TextPos startPosition () const
 
const QString & string () const
 

Detailed Description

Note
It is up to the implementation of a class or function that uses a text query to abide by those rules.
See also
findStringInFile()

Constructor & Destructor Documentation

◆ TextQuery()

Qx::TextQuery::TextQuery ( const QString & string,
Qt::CaseSensitivity cs = Qt::CaseSensitive )

Creates a text query with the target string, abiding by cs case sensitivity.

Member Function Documentation

◆ allowSplit()

bool Qx::TextQuery::allowSplit ( ) const

Returns whether or not the target string will be matched if it falls across one or more line breaks.

The default is false.

◆ caseSensitivity()

Qt::CaseSensitivity Qx::TextQuery::caseSensitivity ( ) const

Returns the case sensitivity of the query.

◆ hitLimit()

int Qx::TextQuery::hitLimit ( ) const

Returns the number of matches to make before stopping the search.

The default is -1 (unlimited).

◆ hitsToSkip()

int Qx::TextQuery::hitsToSkip ( ) const

Returns the number of times to skip the query string before a true match is made.

The default is 0.

◆ setAllowSplit()

void Qx::TextQuery::setAllowSplit ( bool allowSplit)

Sets whether or not the target string will be matched if it falls across one or more line breaks.

◆ setCaseSensitivity()

void Qx::TextQuery::setCaseSensitivity ( Qt::CaseSensitivity caseSensitivity)

Sets the case sensitivity of the query.

◆ setHitLimit()

void Qx::TextQuery::setHitLimit ( int hitLimit)

Sets the the number of matches to make before stopping the search.

Use -1 for no limit.

◆ setHitsToSkip()

void Qx::TextQuery::setHitsToSkip ( int hitsToSkip)

Sets the number of times to skip the query string before a true match is made.

◆ setStartPosition()

void Qx::TextQuery::setStartPosition ( TextPos startPosition)

Sets the position from which the search should begin.

◆ setString()

void Qx::TextQuery::setString ( QString string)

Sets the query's target string.

◆ startPosition()

TextPos Qx::TextQuery::startPosition ( ) const

Returns the position from which the search should begin.

The default is TextPos(Start).

◆ string()

const QString & Qx::TextQuery::string ( ) const

Returns the query's target string.


The documentation for this class was generated from the following files: