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

One real-world event-distribution Pokemon preset. More...

#include <eventpokemondbentry.h>

Inheritance diagram for EventPokemonDBEntry:
Collaboration diagram for EventPokemonDBEntry:

Public Member Functions

QString getTitle () const
 < Distribution title.
QString getDesc () const
QString getPokemon () const
QVector< QString > getOtName () const
 OT-name options.
QString getRegion () const
QVector< QString > getMoves () const
 Move names the mon comes with.
PokemonDBEntrygetToPokemon () const
int getLevel () const
int getOtId () const
int getDvAtk () const
int getDvDef () const
int getDvSpd () const
int getDvSp () const
void qmlProtect (const QQmlEngine *const engine) const
 Pin to C++ ownership.

Protected Member Functions

void qmlRegister () const
 Register with QML.
 EventPokemonDBEntry ()
 Empty entry (built by EventPokemonDB).
 EventPokemonDBEntry (const QJsonValue &data)
 Build from a JSON value.
void deepLink ()
 Resolve the species link.

Protected Attributes

QString title = ""
 Backing field (read via getTitle()).
QString desc = ""
 Backing field (read via getDesc()).
QString pokemon = ""
 Backing field (read via getPokemon()).
QVector< QString > otName
 OT-name options (read via getOtName()).
QString region = ""
 Backing field (read via getRegion()).
QVector< QString > moves
 Move names (read via getMoves()).
int level = -1
 Backing field (read via getLevel()).
int otId = -1
 Backing field (read via getOtId()).
int dvAtk = -1
 Backing field (read via getDvAtk()).
int dvDef = -1
 Backing field (read via getDvDef()).
int dvSpd = -1
 Backing field (read via getDvSpd()).
int dvSp = -1
 Backing field (read via getDvSp()).
PokemonDBEntrytoPokemon = nullptr
 Resolved species (deepLink).

Friends

class EventPokemonDB
 Owning DB constructs/populates entries.

Detailed Description

One real-world event-distribution Pokemon preset.

QObject-getter style DB entry. Describes a distribution (title / desc / region) and the exact mon it gives – species, level, OT id, the four DVs, OT name options, and moves. deepLink() resolves toPokemon. See db.md.

See also
EventPokemonDB, PokemonBox::newPokemon().

Definition at line 37 of file eventpokemondbentry.h.

Constructor & Destructor Documentation

◆ EventPokemonDBEntry() [1/2]

EventPokemonDBEntry::EventPokemonDBEntry ( )
protected

Empty entry (built by EventPokemonDB).

Definition at line 37 of file eventpokemondbentry.cpp.

References qmlRegister().

◆ EventPokemonDBEntry() [2/2]

EventPokemonDBEntry::EventPokemonDBEntry ( const QJsonValue & data)
protected

Build from a JSON value.

Definition at line 40 of file eventpokemondbentry.cpp.

References desc, dvAtk, dvDef, dvSp, dvSpd, level, moves, otId, otName, pokemon, qmlRegister(), region, and title.

Member Function Documentation

◆ deepLink()

void EventPokemonDBEntry::deepLink ( )
protected

Resolve the species link.

Definition at line 99 of file eventpokemondbentry.cpp.

References PokemonDB::getIndAt(), PokemonDB::inst(), pokemon, and toPokemon.

◆ getDesc()

QString EventPokemonDBEntry::getDesc ( ) const
See also
getDesc property.

Definition at line 182 of file eventpokemondbentry.cpp.

References desc.

◆ getDvAtk()

int EventPokemonDBEntry::getDvAtk ( ) const
See also
getDvAtk property.

Definition at line 142 of file eventpokemondbentry.cpp.

References dvAtk.

◆ getDvDef()

int EventPokemonDBEntry::getDvDef ( ) const
See also
getDvDef property.

Definition at line 137 of file eventpokemondbentry.cpp.

References dvDef.

◆ getDvSp()

int EventPokemonDBEntry::getDvSp ( ) const
See also
getDvSp property.

Definition at line 112 of file eventpokemondbentry.cpp.

References dvSp.

◆ getDvSpd()

int EventPokemonDBEntry::getDvSpd ( ) const
See also
getDvSpd property.

Definition at line 132 of file eventpokemondbentry.cpp.

References dvSpd.

◆ getLevel()

int EventPokemonDBEntry::getLevel ( ) const
See also
getLevel property.

Definition at line 152 of file eventpokemondbentry.cpp.

References level.

◆ getMoves()

QVector< QString > EventPokemonDBEntry::getMoves ( ) const

Move names the mon comes with.

Definition at line 157 of file eventpokemondbentry.cpp.

References moves.

◆ getOtId()

int EventPokemonDBEntry::getOtId ( ) const
See also
getOtId property.

Definition at line 167 of file eventpokemondbentry.cpp.

References otId.

◆ getOtName()

QVector< QString > EventPokemonDBEntry::getOtName ( ) const

OT-name options.

Definition at line 172 of file eventpokemondbentry.cpp.

References otName.

◆ getPokemon()

QString EventPokemonDBEntry::getPokemon ( ) const
See also
getPokemon property.

Definition at line 177 of file eventpokemondbentry.cpp.

References pokemon.

◆ getRegion()

QString EventPokemonDBEntry::getRegion ( ) const
See also
getRegion property.

Definition at line 162 of file eventpokemondbentry.cpp.

References region.

◆ getTitle()

QString EventPokemonDBEntry::getTitle ( ) const

< Distribution title.

Distribution description. Species name. Region it was distributed in. Resolved species. Original-trainer id. Attack DV. Defense DV. Speed DV. Special DV. Level.

See also
getTitle property.

Definition at line 187 of file eventpokemondbentry.cpp.

References title.

◆ getToPokemon()

PokemonDBEntry * EventPokemonDBEntry::getToPokemon ( ) const
See also
getToPokemon property.

Definition at line 147 of file eventpokemondbentry.cpp.

References toPokemon.

◆ qmlProtect()

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

Pin to C++ ownership.

Definition at line 117 of file eventpokemondbentry.cpp.

References Utility::qmlProtectUtil().

◆ qmlRegister()

void EventPokemonDBEntry::qmlRegister ( ) const
protected

Register with QML.

Definition at line 122 of file eventpokemondbentry.cpp.

Referenced by EventPokemonDBEntry(), and EventPokemonDBEntry().

◆ EventPokemonDB

friend class EventPokemonDB
friend

Owning DB constructs/populates entries.

Definition at line 91 of file eventpokemondbentry.h.

References EventPokemonDB.

Referenced by EventPokemonDB.

Member Data Documentation

◆ desc

QString EventPokemonDBEntry::desc = ""
protected

Backing field (read via getDesc()).

Definition at line 78 of file eventpokemondbentry.h.

Referenced by EventPokemonDBEntry(), and getDesc().

◆ dvAtk

int EventPokemonDBEntry::dvAtk = -1
protected

Backing field (read via getDvAtk()).

Definition at line 85 of file eventpokemondbentry.h.

Referenced by EventPokemonDBEntry(), and getDvAtk().

◆ dvDef

int EventPokemonDBEntry::dvDef = -1
protected

Backing field (read via getDvDef()).

Definition at line 86 of file eventpokemondbentry.h.

Referenced by EventPokemonDBEntry(), and getDvDef().

◆ dvSp

int EventPokemonDBEntry::dvSp = -1
protected

Backing field (read via getDvSp()).

Definition at line 88 of file eventpokemondbentry.h.

Referenced by EventPokemonDBEntry(), and getDvSp().

◆ dvSpd

int EventPokemonDBEntry::dvSpd = -1
protected

Backing field (read via getDvSpd()).

Definition at line 87 of file eventpokemondbentry.h.

Referenced by EventPokemonDBEntry(), and getDvSpd().

◆ level

int EventPokemonDBEntry::level = -1
protected

Backing field (read via getLevel()).

Definition at line 83 of file eventpokemondbentry.h.

Referenced by EventPokemonDBEntry(), and getLevel().

◆ moves

QVector<QString> EventPokemonDBEntry::moves
protected

Move names (read via getMoves()).

Definition at line 82 of file eventpokemondbentry.h.

Referenced by EventPokemonDBEntry(), and getMoves().

◆ otId

int EventPokemonDBEntry::otId = -1
protected

Backing field (read via getOtId()).

Definition at line 84 of file eventpokemondbentry.h.

Referenced by EventPokemonDBEntry(), and getOtId().

◆ otName

QVector<QString> EventPokemonDBEntry::otName
protected

OT-name options (read via getOtName()).

Definition at line 80 of file eventpokemondbentry.h.

Referenced by EventPokemonDBEntry(), and getOtName().

◆ pokemon

QString EventPokemonDBEntry::pokemon = ""
protected

Backing field (read via getPokemon()).

Definition at line 79 of file eventpokemondbentry.h.

Referenced by deepLink(), EventPokemonDBEntry(), and getPokemon().

◆ region

QString EventPokemonDBEntry::region = ""
protected

Backing field (read via getRegion()).

Definition at line 81 of file eventpokemondbentry.h.

Referenced by EventPokemonDBEntry(), and getRegion().

◆ title

QString EventPokemonDBEntry::title = ""
protected

Backing field (read via getTitle()).

Definition at line 77 of file eventpokemondbentry.h.

Referenced by EventPokemonDBEntry(), and getTitle().

◆ toPokemon

PokemonDBEntry* EventPokemonDBEntry::toPokemon = nullptr
protected

Resolved species (deepLink).

Definition at line 89 of file eventpokemondbentry.h.

Referenced by deepLink(), and getToPokemon().


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