44 results.append(entry);
61 bool singleChar,
bool multiChar,
bool variable)
71 if((normal && entry->normal) ||
72 (control && entry->control) ||
73 (picture && entry->picture) ||
74 (singleChar && entry->singleChar) ||
75 (multiChar && entry->multiChar) ||
76 (variable && entry->variable))
77 results.append(entry);
87 for(
auto entry : QVector<FontDBEntry*>(results))
89 results.removeOne(entry);
98 for(
auto entry : QVector<FontDBEntry*>(results))
100 results.removeOne(entry);
109 for(
auto entry : QVector<FontDBEntry*>(results))
111 results.removeOne(entry);
120 for(
auto entry : QVector<FontDBEntry*>(results))
122 results.removeOne(entry);
131 for(
auto entry : QVector<FontDBEntry*>(results))
133 results.removeOne(entry);
142 for(
auto entry : QVector<FontDBEntry*>(results))
144 results.removeOne(entry);
153 for(
auto entry : QVector<FontDBEntry*>(results))
155 results.removeOne(entry);
164 for(
auto entry : QVector<FontDBEntry*>(results))
166 results.removeOne(entry);
175 for(
auto entry : QVector<FontDBEntry*>(results))
176 if(!entry->singleChar)
177 results.removeOne(entry);
186 for(
auto entry : QVector<FontDBEntry*>(results))
187 if(entry->singleChar)
188 results.removeOne(entry);
197 for(
auto entry : QVector<FontDBEntry*>(results))
198 if(!entry->multiChar)
199 results.removeOne(entry);
208 for(
auto entry : QVector<FontDBEntry*>(results))
210 results.removeOne(entry);
219 for(
auto entry : QVector<FontDBEntry*>(results))
221 results.removeOne(entry);
230 for(
auto entry : QVector<FontDBEntry*>(results))
232 results.removeOne(entry);
246 return results.size();
251 return results.at(ind);
259void FontSearch::qmlRegister()
const
261 static bool registered =
false;
265 qmlRegisterUncreatableType<FontSearch>(
"PSE.DB.FontSearch", 1, 0,
"FontSearch",
"Can't instantiate in QML");
FontSearch * andVariable()
Keep only variable glyphs.
FontSearch * notNormal()
Drop normal glyphs.
FontSearch * notSingleChar()
Drop single-char glyphs.
FontSearch * andPicture()
Keep only picture glyphs.
FontSearch * notShorthand()
Drop shorthand glyphs. Returns this.
FontSearch * andControl()
Keep only control glyphs.
int getFontCount() const
Result count (backs fontCount).
FontSearch * startOver()
Reset to all glyphs. Returns this.
FontSearch * keepAnyOf(bool normal, bool control, bool picture, bool singleChar, bool multiChar, bool variable)
OR-union filter (see note). Returns this.
FontSearch * andNormal()
Keep only normal glyphs.
FontSearch * andMultiChar()
Keep only multi-char glyphs.
const FontDBEntry * fontAt(const int ind) const
Result ind (for QML).
const QVector< FontDBEntry * > getFonts() const
The current result set.
FontSearch * notMultiChar()
Drop multi-char glyphs.
FontSearch * notPicture()
Drop picture glyphs.
FontSearch()
Start with all glyphs in the result set.
FontSearch * clear()
Empty the result set. Returns this.
FontSearch * andShorthand()
Keep only shorthand glyphs. Returns this.
FontSearch * andSingleChar()
Keep only single-char glyphs.
FontSearch * notVariable()
Drop variable glyphs.
FontSearch * notControl()
Drop control glyphs.
void qmlProtect(const QQmlEngine *const engine) const
Pin to C++ ownership.
static FontsDB * inst()
< Number of font glyphs.
static void qmlProtectUtil(const QObject *const obj, const QQmlEngine *const engine)
Pin obj to C++ ownership so the QML engine never garbage-collects it.
One in-game font character: its code, output text, and classification flags.