|
Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
|
One credits entry – and the canonical example of the "DB entry" pattern. More...
#include <creditdbentry.h>
Public Member Functions | |
| QString | getSection () const |
| < Credits section heading. | |
| QString | getName () const |
| QString | getUrl () const |
| QString | getNote () const |
| QString | getLicense () const |
| QString | getMandated () const |
| void | qmlProtect (const QQmlEngine *const engine) const |
| Pin to C++ ownership (anti-GC). | |
Protected Member Functions | |
| CreditDBEntry () | |
| Empty entry (protected – built by the DB). | |
| CreditDBEntry (QJsonValue &data) | |
| Build from a JSON value. | |
| CreditDBEntry (QString section) | |
| Build a section-header entry. | |
| void | qmlRegister () const |
| Register this entry type with QML. | |
Static Protected Member Functions | |
| static void | process (QJsonObject &data) |
| Parse JSON and append entries to CreditsDB's store. | |
Protected Attributes | |
| QString | section = "" |
| Backing field (read via getSection()). | |
| QString | name = "" |
| Backing field (read via getName()). | |
| QString | url = "" |
| Backing field (read via getUrl()). | |
| QString | note = "" |
| Backing field (read via getNote()). | |
| QString | license = "" |
| Backing field (read via getLicense()). | |
| QString | mandated = "" |
| Backing field (read via getMandated()). | |
Friends | |
| class | CreditsDB |
| The owning DB constructs/populates these entries. | |
One credits entry – and the canonical example of the "DB entry" pattern.
Definition at line 42 of file creditdbentry.h.
|
protected |
Empty entry (protected – built by the DB).
Definition at line 31 of file creditdbentry.cpp.
References qmlRegister().
Referenced by process().
|
protected |
Build from a JSON value.
Definition at line 35 of file creditdbentry.cpp.
References license, mandated, name, note, qmlRegister(), and url.
|
protected |
Build a section-header entry.
Definition at line 46 of file creditdbentry.cpp.
References qmlRegister(), and section.
| QString CreditDBEntry::getLicense | ( | ) | const |
| QString CreditDBEntry::getMandated | ( | ) | const |
| QString CreditDBEntry::getName | ( | ) | const |
| QString CreditDBEntry::getNote | ( | ) | const |
| QString CreditDBEntry::getSection | ( | ) | const |
< Credits section heading.
Credited name. Associated URL. Free-text note. License text/name. Mandated-attribution text.
Definition at line 83 of file creditdbentry.cpp.
References section.
| QString CreditDBEntry::getUrl | ( | ) | const |
|
staticprotected |
Parse JSON and append entries to CreditsDB's store.
Definition at line 88 of file creditdbentry.cpp.
References CreditDBEntry(), CreditsDB::inst(), and section.
Referenced by CreditsDB::load().
| void CreditDBEntry::qmlProtect | ( | const QQmlEngine *const | engine | ) | const |
Pin to C++ ownership (anti-GC).
Definition at line 58 of file creditdbentry.cpp.
References Utility::qmlProtectUtil().
|
protected |
Register this entry type with QML.
Definition at line 107 of file creditdbentry.cpp.
Referenced by CreditDBEntry(), CreditDBEntry(), and CreditDBEntry().
|
friend |
The owning DB constructs/populates these entries.
Definition at line 77 of file creditdbentry.h.
References CreditsDB.
Referenced by CreditsDB.
|
protected |
Backing field (read via getLicense()).
Definition at line 74 of file creditdbentry.h.
Referenced by CreditDBEntry(), and getLicense().
|
protected |
Backing field (read via getMandated()).
Definition at line 75 of file creditdbentry.h.
Referenced by CreditDBEntry(), and getMandated().
|
protected |
Backing field (read via getName()).
Definition at line 71 of file creditdbentry.h.
Referenced by CreditDBEntry(), and getName().
|
protected |
Backing field (read via getNote()).
Definition at line 73 of file creditdbentry.h.
Referenced by CreditDBEntry(), and getNote().
|
protected |
Backing field (read via getSection()).
Definition at line 70 of file creditdbentry.h.
Referenced by CreditDBEntry(), getSection(), and process().
|
protected |
Backing field (read via getUrl()).
Definition at line 72 of file creditdbentry.h.
Referenced by CreditDBEntry(), and getUrl().