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

One fly destination: its name/index and the map it flies to. More...

#include <flydbentry.h>

Inheritance diagram for FlyDBEntry:
Collaboration diagram for FlyDBEntry:

Public Member Functions

QString getName () const
 < Destination name.
int getInd () const
MapDBEntrygetToMap () const
void qmlProtect (const QQmlEngine *const engine) const
 Pin to C++ ownership.

Protected Member Functions

 FlyDBEntry ()
 Empty entry (built by FlyDB).
 FlyDBEntry (QJsonValue &data)
 Build from a JSON value.
void deepLink ()
 Resolve the destination map.
void qmlRegister () const
 Register with QML.

Protected Attributes

QString name = ""
 Backing field (read via getName()).
int ind = 0
 Backing field (read via getInd()).
MapDBEntrytoMap = nullptr
 Backing field (read via getToMap()).

Friends

class FlyDB
 The owning DB constructs/populates these entries.

Detailed Description

One fly destination: its name/index and the map it flies to.

QObject-getter style DB entry (protected fields + getters). toMap is resolved in deepLink(). See db.md for the entry convention.

See also
FlyDB.

Definition at line 37 of file flydbentry.h.

Constructor & Destructor Documentation

◆ FlyDBEntry() [1/2]

FlyDBEntry::FlyDBEntry ( )
protected

Empty entry (built by FlyDB).

Definition at line 30 of file flydbentry.cpp.

References qmlRegister().

◆ FlyDBEntry() [2/2]

FlyDBEntry::FlyDBEntry ( QJsonValue & data)
protected

Build from a JSON value.

Definition at line 34 of file flydbentry.cpp.

References ind, name, and qmlRegister().

Member Function Documentation

◆ deepLink()

void FlyDBEntry::deepLink ( )
protected

Resolve the destination map.

Definition at line 43 of file flydbentry.cpp.

References MapsDB::getIndAt(), MapsDB::inst(), name, and toMap.

◆ getInd()

int FlyDBEntry::getInd ( ) const
See also
getInd property.

Definition at line 66 of file flydbentry.cpp.

References ind.

◆ getName()

QString FlyDBEntry::getName ( ) const

< Destination name.

Destination index. Resolved destination map.

See also
getName property.

Definition at line 71 of file flydbentry.cpp.

References name.

◆ getToMap()

MapDBEntry * FlyDBEntry::getToMap ( ) const
See also
getToMap property.

Definition at line 56 of file flydbentry.cpp.

References toMap.

◆ qmlProtect()

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

Pin to C++ ownership.

Definition at line 61 of file flydbentry.cpp.

References Utility::qmlProtectUtil().

◆ qmlRegister()

void FlyDBEntry::qmlRegister ( ) const
protected

Register with QML.

Definition at line 76 of file flydbentry.cpp.

Referenced by FlyDBEntry(), and FlyDBEntry().

◆ FlyDB

friend class FlyDB
friend

The owning DB constructs/populates these entries.

Definition at line 61 of file flydbentry.h.

References FlyDB.

Referenced by FlyDB.

Member Data Documentation

◆ ind

int FlyDBEntry::ind = 0
protected

Backing field (read via getInd()).

Definition at line 58 of file flydbentry.h.

Referenced by FlyDBEntry(), and getInd().

◆ name

QString FlyDBEntry::name = ""
protected

Backing field (read via getName()).

Definition at line 57 of file flydbentry.h.

Referenced by deepLink(), FlyDBEntry(), and getName().

◆ toMap

MapDBEntry* FlyDBEntry::toMap = nullptr
protected

Backing field (read via getToMap()).

Definition at line 59 of file flydbentry.h.

Referenced by deepLink(), and getToMap().


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