|
Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
|
One item's static data: name/flags, pricing, and where it's used. More...
#include <itemdbentry.h>
Public Member Functions | |
| QString | getName () const |
| < Internal item name. | |
| int | getInd () const |
| bool | getOnce () const |
| bool | getGlitch () const |
| QString | getReadable () const |
| int | getTm () const |
| int | getHm () const |
| int | getPrice () const |
| QString | getInfo () const |
| int | buyPriceMoney () const |
| int | buyPriceCoins () const |
| int | sellPriceMoney () const |
| int | sellPriceCoins () const |
| bool | canSell () const |
| bool | isGameCornerExclusive () const |
| MoveDBEntry * | getToMove () const |
| GameCornerDBEntry * | getToGameCorner () const |
| const QVector< MapDBEntrySpriteItem * > | getToMapSpriteItem () const |
| Map sprites that drop this item. | |
| int | getToMapSpriteItemSize () const |
| MapDBEntrySpriteItem * | getToMapSpriteItemAt (int ind) const |
Map-sprite-item ind (for QML). | |
| const QVector< PokemonDBEntryEvolution * > | getToEvolvePokemon () const |
| Evolutions triggered by this item. | |
| int | getToEvolvePokemonSize () const |
| PokemonDBEntryEvolution * | getToEvolvePokemonAt (int ind) const |
Evolution ind (for QML). | |
| const QVector< PokemonDBEntry * > | getToTeachPokemon () const |
| Pokemon this TM/HM teaches. | |
| int | getToTeachPokemonSize () const |
| PokemonDBEntry * | getToTeachPokemonAt (int ind) const |
Taught Pokemon ind (for QML). | |
| void | qmlProtect (const QQmlEngine *const engine) const |
| Pin to C++ ownership. | |
Protected Member Functions | |
| ItemDBEntry () | |
| Empty entry (built by ItemsDB). | |
| ItemDBEntry (const QJsonValue &data) | |
| Build from a JSON value. | |
| void | deepLink () |
| Resolve the move/Game-Corner links. | |
| void | qmlRegister () const |
| Register with QML. | |
Protected Attributes | |
| QString | name = "" |
| Backing field (read via getName()). | |
| int | ind = -1 |
| Backing field (read via getInd()). | |
| bool | once = false |
| Backing field (read via getOnce()). | |
| bool | glitch = false |
| Backing field (read via getGlitch()). | |
| QString | readable = "" |
| Backing field (read via getReadable()). | |
| int | tm = -1 |
| Backing field (read via getTm()). | |
| int | hm = -1 |
| Backing field (read via getHm()). | |
| int | price = -1 |
| Backing field (read via getPrice()). | |
| QString | info = "" |
| Backing field (read via getInfo()); optional "info" in items.json. | |
| MoveDBEntry * | toMove = nullptr |
| Resolved taught move (deepLink). | |
| GameCornerDBEntry * | toGameCorner = nullptr |
| Resolved Game Corner entry (deepLink). | |
| QVector< MapDBEntrySpriteItem * > | toMapSpriteItem |
| Map sprites dropping this (back-ref). | |
| QVector< PokemonDBEntryEvolution * > | toEvolvePokemon |
| Evolutions using this (back-ref). | |
| QVector< PokemonDBEntry * > | toTeachPokemon |
| Pokemon this teaches (back-ref). | |
Friends | |
| class | ItemsDB |
| Owning DB constructs/populates entries. | |
| struct | MapDBEntrySpriteItem |
| Writes toMapSpriteItem. | |
| struct | GameCornerDBEntry |
| struct | PokemonDBEntry |
| struct | PokemonDBEntryEvolution |
One item's static data: name/flags, pricing, and where it's used.
QObject-getter style DB entry. Beyond the basic fields it computes the full pricing surface (buy/sell, money/coins, plus canSell / isGameCornerExclusive) and exposes several cross-reference lists – the map sprites that drop it, the evolutions that use it, and the Pokemon it teaches. Because Qt can't expose a vector as a property, each list is surfaced as a ...Size property plus an invokable ...At(ind) accessor (the standard workaround). Each friend writes its respective back-reference during deepLink.
Definition at line 46 of file itemdbentry.h.
|
protected |
Empty entry (built by ItemsDB).
Definition at line 30 of file itemdbentry.cpp.
References qmlRegister().
|
protected |
| int ItemDBEntry::buyPriceCoins | ( | ) | const |
Definition at line 208 of file itemdbentry.cpp.
References GameCornerDB::getBuyPrice(), GameCornerDB::inst(), price, and toGameCorner.
Referenced by sellPriceCoins(), and ItemMarketModel::vendorListItem().
| int ItemDBEntry::buyPriceMoney | ( | ) | const |
Definition at line 200 of file itemdbentry.cpp.
References price.
Referenced by sellPriceMoney(), and ItemMarketModel::vendorListItem().
| bool ItemDBEntry::canSell | ( | ) | const |
Definition at line 251 of file itemdbentry.cpp.
References price.
Referenced by ItemMarketModel::vendorListItem().
|
protected |
Resolve the move/Game-Corner links.
Definition at line 62 of file itemdbentry.cpp.
References MovesDB::getIndAt(), hm, MovesDB::inst(), name, tm, and toMove.
| bool ItemDBEntry::getGlitch | ( | ) | const |
| int ItemDBEntry::getHm | ( | ) | const |
| int ItemDBEntry::getInd | ( | ) | const |
Definition at line 190 of file itemdbentry.cpp.
References ind.
Referenced by ItemMarketModel::buyableInGame(), and ItemMarketModel::isVendingItem().
| QString ItemDBEntry::getInfo | ( | ) | const |
Definition at line 160 of file itemdbentry.cpp.
References info.
Referenced by ItemSelectModel::infoForInd().
| QString ItemDBEntry::getName | ( | ) | const |
< Internal item name.
Item index. One-time-only item. Glitch item. Display name. TM number, if a TM. HM number, if an HM. Base price. Detailed-tooltip lore: what it is / how it's obtained. Buy price in money. Buy price in coins. Sell price in money. Sell price in coins. Whether it can be sold. Coins-only (Game Corner) item. Move taught (if a TM/HM). Game Corner prize entry, if any. < Count of map sprites dropping this. Count of evolutions using this. Count of Pokemon it teaches.
Definition at line 195 of file itemdbentry.cpp.
References name.
| bool ItemDBEntry::getOnce | ( | ) | const |
| int ItemDBEntry::getPrice | ( | ) | const |
| QString ItemDBEntry::getReadable | ( | ) | const |
| int ItemDBEntry::getTm | ( | ) | const |
| const QVector< PokemonDBEntryEvolution * > ItemDBEntry::getToEvolvePokemon | ( | ) | const |
Evolutions triggered by this item.
Definition at line 109 of file itemdbentry.cpp.
References toEvolvePokemon.
| PokemonDBEntryEvolution * ItemDBEntry::getToEvolvePokemonAt | ( | int | ind | ) | const |
Evolution ind (for QML).
Definition at line 119 of file itemdbentry.cpp.
References ind, PokemonDBEntryEvolution, and toEvolvePokemon.
| int ItemDBEntry::getToEvolvePokemonSize | ( | ) | const |
Definition at line 114 of file itemdbentry.cpp.
References toEvolvePokemon.
| GameCornerDBEntry * ItemDBEntry::getToGameCorner | ( | ) | const |
Definition at line 145 of file itemdbentry.cpp.
References GameCornerDBEntry, and toGameCorner.
| const QVector< MapDBEntrySpriteItem * > ItemDBEntry::getToMapSpriteItem | ( | ) | const |
Map sprites that drop this item.
Definition at line 127 of file itemdbentry.cpp.
References toMapSpriteItem.
| MapDBEntrySpriteItem * ItemDBEntry::getToMapSpriteItemAt | ( | int | ind | ) | const |
Map-sprite-item ind (for QML).
Definition at line 137 of file itemdbentry.cpp.
References ind, MapDBEntrySpriteItem, and toMapSpriteItem.
| int ItemDBEntry::getToMapSpriteItemSize | ( | ) | const |
Definition at line 132 of file itemdbentry.cpp.
References toMapSpriteItem.
| MoveDBEntry * ItemDBEntry::getToMove | ( | ) | const |
| const QVector< PokemonDBEntry * > ItemDBEntry::getToTeachPokemon | ( | ) | const |
Pokemon this TM/HM teaches.
Definition at line 86 of file itemdbentry.cpp.
References toTeachPokemon.
| PokemonDBEntry * ItemDBEntry::getToTeachPokemonAt | ( | int | ind | ) | const |
Taught Pokemon ind (for QML).
Definition at line 96 of file itemdbentry.cpp.
References ind, PokemonDBEntry, and toTeachPokemon.
| int ItemDBEntry::getToTeachPokemonSize | ( | ) | const |
Definition at line 91 of file itemdbentry.cpp.
References toTeachPokemon.
| bool ItemDBEntry::isGameCornerExclusive | ( | ) | const |
Definition at line 256 of file itemdbentry.cpp.
References toGameCorner.
Referenced by ItemMarketModel::vendorListItem().
| void ItemDBEntry::qmlProtect | ( | const QQmlEngine *const | engine | ) | const |
Pin to C++ ownership.
Definition at line 104 of file itemdbentry.cpp.
References Utility::qmlProtectUtil().
|
protected |
Register with QML.
Definition at line 75 of file itemdbentry.cpp.
References once.
Referenced by ItemDBEntry(), and ItemDBEntry().
| int ItemDBEntry::sellPriceCoins | ( | ) | const |
Definition at line 242 of file itemdbentry.cpp.
References buyPriceCoins().
| int ItemDBEntry::sellPriceMoney | ( | ) | const |
Definition at line 237 of file itemdbentry.cpp.
References buyPriceMoney().
|
friend |
Definition at line 129 of file itemdbentry.h.
References GameCornerDBEntry.
Referenced by GameCornerDBEntry, and getToGameCorner().
|
friend |
Owning DB constructs/populates entries.
Definition at line 127 of file itemdbentry.h.
References ItemsDB.
Referenced by ItemsDB.
|
friend |
Writes toMapSpriteItem.
Definition at line 128 of file itemdbentry.h.
References MapDBEntrySpriteItem.
Referenced by getToMapSpriteItemAt(), and MapDBEntrySpriteItem.
|
friend |
Definition at line 130 of file itemdbentry.h.
References PokemonDBEntry.
Referenced by getToTeachPokemonAt(), and PokemonDBEntry.
|
friend |
Definition at line 131 of file itemdbentry.h.
References PokemonDBEntryEvolution.
Referenced by getToEvolvePokemonAt(), and PokemonDBEntryEvolution.
|
protected |
Backing field (read via getGlitch()).
Definition at line 114 of file itemdbentry.h.
Referenced by getGlitch(), and ItemDBEntry().
|
protected |
Backing field (read via getHm()).
Definition at line 117 of file itemdbentry.h.
Referenced by deepLink(), getHm(), and ItemDBEntry().
|
protected |
Backing field (read via getInd()).
Definition at line 112 of file itemdbentry.h.
Referenced by getInd(), getToEvolvePokemonAt(), getToMapSpriteItemAt(), getToTeachPokemonAt(), and ItemDBEntry().
|
protected |
Backing field (read via getInfo()); optional "info" in items.json.
Definition at line 119 of file itemdbentry.h.
Referenced by getInfo(), and ItemDBEntry().
|
protected |
Backing field (read via getName()).
Definition at line 111 of file itemdbentry.h.
Referenced by deepLink(), getName(), and ItemDBEntry().
|
protected |
Backing field (read via getOnce()).
Definition at line 113 of file itemdbentry.h.
Referenced by getOnce(), ItemDBEntry(), and qmlRegister().
|
protected |
Backing field (read via getPrice()).
Definition at line 118 of file itemdbentry.h.
Referenced by buyPriceCoins(), buyPriceMoney(), canSell(), getPrice(), and ItemDBEntry().
|
protected |
Backing field (read via getReadable()).
Definition at line 115 of file itemdbentry.h.
Referenced by getReadable(), and ItemDBEntry().
|
protected |
Backing field (read via getTm()).
Definition at line 116 of file itemdbentry.h.
Referenced by deepLink(), getTm(), and ItemDBEntry().
|
protected |
Evolutions using this (back-ref).
Definition at line 124 of file itemdbentry.h.
Referenced by getToEvolvePokemon(), getToEvolvePokemonAt(), and getToEvolvePokemonSize().
|
protected |
Resolved Game Corner entry (deepLink).
Definition at line 122 of file itemdbentry.h.
Referenced by buyPriceCoins(), getToGameCorner(), and isGameCornerExclusive().
|
protected |
Map sprites dropping this (back-ref).
Definition at line 123 of file itemdbentry.h.
Referenced by getToMapSpriteItem(), getToMapSpriteItemAt(), and getToMapSpriteItemSize().
|
protected |
Resolved taught move (deepLink).
Definition at line 121 of file itemdbentry.h.
Referenced by deepLink(), and getToMove().
|
protected |
Pokemon this teaches (back-ref).
Definition at line 125 of file itemdbentry.h.
Referenced by getToTeachPokemon(), getToTeachPokemonAt(), and getToTeachPokemonSize().