Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
Loading...
Searching...
No Matches
FontSearch Class Reference

A chainable filter ("finder") over the font glyphs. More...

#include <fontsearch.h>

Inheritance diagram for FontSearch:
Collaboration diagram for FontSearch:

Public Member Functions

 FontSearch ()
 Start with all glyphs in the result set.
FontSearchstartOver ()
 Reset to all glyphs. Returns this.
FontSearchclear ()
 Empty the result set. Returns this.
FontSearchkeepAnyOf (bool normal, bool control, bool picture, bool singleChar, bool multiChar, bool variable)
 OR-union filter (see note). Returns this.
FontSearchandShorthand ()
 Keep only shorthand glyphs. Returns this.
FontSearchnotShorthand ()
 Drop shorthand glyphs. Returns this.
FontSearchandNormal ()
 Keep only normal glyphs.
FontSearchnotNormal ()
 Drop normal glyphs.
FontSearchandControl ()
 Keep only control glyphs.
FontSearchnotControl ()
 Drop control glyphs.
FontSearchandPicture ()
 Keep only picture glyphs.
FontSearchnotPicture ()
 Drop picture glyphs.
FontSearchandSingleChar ()
 Keep only single-char glyphs.
FontSearchnotSingleChar ()
 Drop single-char glyphs.
FontSearchandMultiChar ()
 Keep only multi-char glyphs.
FontSearchnotMultiChar ()
 Drop multi-char glyphs.
FontSearchandVariable ()
 Keep only variable glyphs.
FontSearchnotVariable ()
 Drop variable glyphs.
const QVector< FontDBEntry * > getFonts () const
 The current result set.
int getFontCount () const
 Result count (backs fontCount).
const FontDBEntryfontAt (const int ind) const
 Result ind (for QML).
void qmlProtect (const QQmlEngine *const engine) const
 Pin to C++ ownership.

Detailed Description

A chainable filter ("finder") over the font glyphs.

Obtained from FontsDB (search()/searchRaw()). Starts with all glyphs in results and narrows them with chainable calls – each and* / not* method returns this, so the UI/keyboard can write search()->andNormal()->notControl(). keepAnyOf() is the one OR-combiner (see its note); the rest are AND filters. fontAt / getFonts read the result.

Note
fontCount is live and notifies, so a bound view updates as filters apply.
See also
FontsDB, FontDBEntry, MapSearch (the analogous map finder).

Definition at line 39 of file fontsearch.h.

Constructor & Destructor Documentation

◆ FontSearch()

FontSearch::FontSearch ( )

Member Function Documentation

◆ andControl()

FontSearch * FontSearch::andControl ( )

Keep only control glyphs.

Definition at line 129 of file fontsearch.cpp.

References FontSearch().

◆ andMultiChar()

FontSearch * FontSearch::andMultiChar ( )

Keep only multi-char glyphs.

Definition at line 195 of file fontsearch.cpp.

References FontSearch().

◆ andNormal()

FontSearch * FontSearch::andNormal ( )

Keep only normal glyphs.

Definition at line 107 of file fontsearch.cpp.

References FontSearch().

◆ andPicture()

FontSearch * FontSearch::andPicture ( )

Keep only picture glyphs.

Definition at line 151 of file fontsearch.cpp.

References FontSearch().

◆ andShorthand()

FontSearch * FontSearch::andShorthand ( )

Keep only shorthand glyphs. Returns this.

Definition at line 85 of file fontsearch.cpp.

References FontSearch().

◆ andSingleChar()

FontSearch * FontSearch::andSingleChar ( )

Keep only single-char glyphs.

Definition at line 173 of file fontsearch.cpp.

References FontSearch().

◆ andVariable()

FontSearch * FontSearch::andVariable ( )

Keep only variable glyphs.

Definition at line 217 of file fontsearch.cpp.

References FontSearch().

◆ clear()

FontSearch * FontSearch::clear ( )

Empty the result set. Returns this.

Definition at line 52 of file fontsearch.cpp.

References clear(), and FontSearch().

Referenced by clear(), keepAnyOf(), and startOver().

◆ fontAt()

const FontDBEntry * FontSearch::fontAt ( const int ind) const

Result ind (for QML).

Definition at line 249 of file fontsearch.cpp.

◆ getFontCount()

int FontSearch::getFontCount ( ) const

Result count (backs fontCount).

Definition at line 244 of file fontsearch.cpp.

◆ getFonts()

const QVector< FontDBEntry * > FontSearch::getFonts ( ) const

The current result set.

Definition at line 239 of file fontsearch.cpp.

◆ keepAnyOf()

FontSearch * FontSearch::keepAnyOf ( bool normal,
bool control,
bool picture,
bool singleChar,
bool multiChar,
bool variable )

OR-union filter (see note). Returns this.

Definition at line 60 of file fontsearch.cpp.

References clear(), FontSearch(), and FontsDB::inst().

◆ notControl()

FontSearch * FontSearch::notControl ( )

Drop control glyphs.

Definition at line 140 of file fontsearch.cpp.

References FontSearch().

◆ notMultiChar()

FontSearch * FontSearch::notMultiChar ( )

Drop multi-char glyphs.

Definition at line 206 of file fontsearch.cpp.

References FontSearch().

◆ notNormal()

FontSearch * FontSearch::notNormal ( )

Drop normal glyphs.

Definition at line 118 of file fontsearch.cpp.

References FontSearch().

◆ notPicture()

FontSearch * FontSearch::notPicture ( )

Drop picture glyphs.

Definition at line 162 of file fontsearch.cpp.

References FontSearch().

◆ notShorthand()

FontSearch * FontSearch::notShorthand ( )

Drop shorthand glyphs. Returns this.

Definition at line 96 of file fontsearch.cpp.

References FontSearch().

◆ notSingleChar()

FontSearch * FontSearch::notSingleChar ( )

Drop single-char glyphs.

Definition at line 184 of file fontsearch.cpp.

References FontSearch().

◆ notVariable()

FontSearch * FontSearch::notVariable ( )

Drop variable glyphs.

Definition at line 228 of file fontsearch.cpp.

References FontSearch().

◆ qmlProtect()

void FontSearch::qmlProtect ( const QQmlEngine *const engine) const

Pin to C++ ownership.

Definition at line 254 of file fontsearch.cpp.

References Utility::qmlProtectUtil().

◆ startOver()

FontSearch * FontSearch::startOver ( )

Reset to all glyphs. Returns this.

Definition at line 37 of file fontsearch.cpp.

References clear(), FontSearch(), and FontsDB::inst().

Referenced by FontSearch().


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