|
Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
|
The types database – the type list, keyed by name. More...
#include <types.h>
Public Member Functions | |
| const QVector< TypeDBEntry * > | getStore () const |
| All types. | |
| const QHash< QString, TypeDBEntry * > | getInd () const |
| Name->entry index. | |
| int | getStoreSize () const |
| Type count. | |
| TypeDBEntry * | getStoreAt (int idx) const |
| Type by store index (for QML). | |
| TypeDBEntry * | getIndAt (const QString &key) const |
| Type by name key (for QML). | |
| void | load () |
| Load types from JSON. | |
| void | index () |
| Build the name->entry index. | |
| void | qmlProtect (const QQmlEngine *const engine) const |
| Pin to C++ ownership. | |
Static Public Member Functions | |
| static TypesDB * | inst () |
| < Number of types. | |
The types database – the type list, keyed by name.
Standard DB-singleton with a name index (see CreditsDB / db.md).
|
nodiscard |
| TypeDBEntry * TypesDB::getIndAt | ( | const QString & | key | ) | const |
Type by name key (for QML).
Definition at line 53 of file types.cpp.
Referenced by MoveDBEntry::deepLink(), and PokemonDBEntry::deepLink().
|
nodiscard |
All types.
Definition at line 43 of file types.cpp.
Referenced by TypesModel::data(), TypesModel::rowCount(), and TypesModel::valToIndex().
| TypeDBEntry * TypesDB::getStoreAt | ( | int | idx | ) | const |
Type by store index (for QML).
Definition at line 47 of file types.cpp.
Referenced by PokemonBox::randomize().
|
static |
< Number of types.
The process-wide TypesDB singleton.
Definition at line 37 of file types.cpp.
Referenced by TypesModel::data(), MoveDBEntry::deepLink(), PokemonDBEntry::deepLink(), DB::qmlProtect(), PokemonBox::randomize(), TypesModel::rowCount(), DB::types(), and TypesModel::valToIndex().
| void TypesDB::load | ( | ) |
Load types from JSON.
Definition at line 58 of file types.cpp.
References GameData::inst(), and GameData::json().
| void TypesDB::qmlProtect | ( | const QQmlEngine *const | engine | ) | const |
Pin to C++ ownership.
Definition at line 80 of file types.cpp.
References Utility::qmlProtectUtil().
Referenced by DB::qmlProtect().