A filter for chess games in a PGN database.
More...
#include <pgngamefilter.h>
A filter for chess games in a PGN database.
A PgnGameFilter object can be used to filter games in a PGN database by matching the filtering terms to the games' PGN tags.
- See also
- PgnGameEntry
◆ Result
The result of the game.
| Enumerator |
|---|
| AnyResult | Any result (no filtering)
|
| EitherPlayerWins | Either player wins.
|
| WhiteWins | The white player wins.
|
| BlackWins | The black player wins.
|
| FirstPlayerWins | The first player wins.
|
| FirstPlayerLoses | The first player loses.
|
| Draw | The game is a draw.
|
| Unfinished | The game wasn't completed.
|
◆ Type
The type of the filter.
| Enumerator |
|---|
| FixedString | Filter all tags with a single fixed string.
|
| Advanced | Use invididual filtering terms for each tag.
|
◆ PgnGameFilter() [1/2]
| PgnGameFilter::PgnGameFilter |
( |
| ) |
|
Creates a new empty filter.
An empty filter will not filter out any games. The filter's type is Advanced.
◆ PgnGameFilter() [2/2]
| PgnGameFilter::PgnGameFilter |
( |
const QString & |
pattern | ) |
|
Creates a new filter based on a fixed string.
Games that have tags matching pattern will be filtered in. The filter's type is FixedString.
◆ event()
| const char * PgnGameFilter::event |
( |
| ) |
const |
|
inline |
Returns the filter for the Event tag.
◆ isResultInverted()
| bool PgnGameFilter::isResultInverted |
( |
| ) |
const |
|
inline |
Returns true if the filter is looking for the inverse of result(); otherwise returns false.
◆ maxDate()
| const QDate & PgnGameFilter::maxDate |
( |
| ) |
const |
|
inline |
Returns the filter for the game's maximum starting date.
- Note
- A null QDate won't filter out any games.
◆ maxRound()
| int PgnGameFilter::maxRound |
( |
| ) |
const |
|
inline |
Returns the filter for the maximum round ordinal.
◆ minDate()
| const QDate & PgnGameFilter::minDate |
( |
| ) |
const |
|
inline |
Returns the filter for the game's minimum starting date.
- Note
- A null QDate won't filter out any games.
◆ minRound()
| int PgnGameFilter::minRound |
( |
| ) |
const |
|
inline |
Returns the filter for the minimum round ordinal.
◆ opponent()
| const char * PgnGameFilter::opponent |
( |
| ) |
const |
|
inline |
Returns the filter for the opponent of the first player.
◆ pattern()
| const char * PgnGameFilter::pattern |
( |
| ) |
const |
|
inline |
Returns the pattern for FixedString mode.
◆ player()
| const char * PgnGameFilter::player |
( |
| ) |
const |
|
inline |
Returns the filter for the first player.
The first player's side/color is determined by the playerSide() member function.
◆ playerSide()
Returns the filter for the side/color of the first player.
◆ result()
Returns the filter for the Result tag.
◆ setEvent()
| void PgnGameFilter::setEvent |
( |
const QString & |
event | ) |
|
Sets the Event tag filter to event.
◆ setMaxDate()
| void PgnGameFilter::setMaxDate |
( |
const QDate & |
date | ) |
|
Sets the maximum starting date filter to date.
◆ setMaxRound()
| void PgnGameFilter::setMaxRound |
( |
int |
round | ) |
|
Sets the maximum round ordinal filter to round.
◆ setMinDate()
| void PgnGameFilter::setMinDate |
( |
const QDate & |
date | ) |
|
Sets the minimum starting date filter to date.
◆ setMinRound()
| void PgnGameFilter::setMinRound |
( |
int |
round | ) |
|
Sets the minimum round ordinal filter to round.
◆ setOpponent()
| void PgnGameFilter::setOpponent |
( |
const QString & |
name | ) |
|
Sets the first player's opponent filter to name.
◆ setPattern()
| void PgnGameFilter::setPattern |
( |
const QString & |
pattern | ) |
|
Sets the FixedString pattern to pattern.
This function will change the filter type to FixedString.
◆ setPlayer()
Sets the side player's filter to name.
◆ setResult()
| void PgnGameFilter::setResult |
( |
Result |
result | ) |
|
Sets the Result tag filter to result.
◆ setResultInverted()
| void PgnGameFilter::setResultInverted |
( |
bool |
invert | ) |
|
Sets the resultInverted value to invert.
◆ setSite()
| void PgnGameFilter::setSite |
( |
const QString & |
site | ) |
|
Sets the Site tag filter to site.
◆ site()
| const char * PgnGameFilter::site |
( |
| ) |
const |
|
inline |
Returns the filter for the Site tag.
◆ type()
Returns the type of the filter.
The documentation for this class was generated from the following files: