Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
Toggle main menu visibility
Loading...
Searching...
No Matches
creditdbentry.h
Go to the documentation of this file.
1
/*
2
* Copyright 2020 Twilight
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
16
#pragma once
17
#include <QObject>
18
#include <QQmlEngine>
19
#include <QString>
20
#include <QJsonValue>
21
22
#include "
../db_autoport.h
"
23
42
struct
DB_AUTOPORT
CreditDBEntry
:
public
QObject {
43
Q_OBJECT
44
Q_PROPERTY(QString
getSection
READ
getSection
CONSTANT)
45
Q_PROPERTY(QString
getName
READ
getName
CONSTANT)
46
Q_PROPERTY(QString
getUrl
READ
getUrl
CONSTANT)
47
Q_PROPERTY(QString
getNote
READ
getNote
CONSTANT)
48
Q_PROPERTY(QString
getLicense
READ
getLicense
CONSTANT)
49
Q_PROPERTY(QString
getMandated
READ
getMandated
CONSTANT)
50
51
public
:
52
QString
getSection
()
const
;
53
QString
getName
()
const
;
54
QString
getUrl
()
const
;
55
QString
getNote
()
const
;
56
QString
getLicense
()
const
;
57
QString
getMandated
()
const
;
58
59
public
slots:
60
void
qmlProtect
(
const
QQmlEngine*
const
engine)
const
;
61
62
protected
:
63
CreditDBEntry
();
64
CreditDBEntry
(QJsonValue& data);
65
CreditDBEntry
(QString
section
);
66
67
static
void
process
(QJsonObject& data);
68
void
qmlRegister
()
const
;
69
70
QString
section
=
""
;
71
QString
name
=
""
;
72
QString
url
=
""
;
73
QString
note
=
""
;
74
QString
license
=
""
;
75
QString
mandated
=
""
;
76
77
friend
class
CreditsDB
;
78
};
db_autoport.h
Import/export macro for the db library, plus the central list of DB entry pointer types declared opaq...
DB_AUTOPORT
#define DB_AUTOPORT
Expands to the correct dllexport/dllimport decoration for this library.
Definition
db_autoport.h:37
CreditDBEntry::process
static void process(QJsonObject &data)
Parse JSON and append entries to CreditsDB's store.
Definition
creditdbentry.cpp:88
CreditDBEntry::getName
QString getName() const
Definition
creditdbentry.cpp:78
CreditDBEntry::url
QString url
Backing field (read via getUrl()).
Definition
creditdbentry.h:72
CreditDBEntry::getUrl
QString getUrl() const
Definition
creditdbentry.cpp:73
CreditDBEntry::name
QString name
Backing field (read via getName()).
Definition
creditdbentry.h:71
CreditDBEntry::license
QString license
Backing field (read via getLicense()).
Definition
creditdbentry.h:74
CreditDBEntry::note
QString note
Backing field (read via getNote()).
Definition
creditdbentry.h:73
CreditDBEntry::getNote
QString getNote() const
Definition
creditdbentry.cpp:68
CreditDBEntry::qmlRegister
void qmlRegister() const
Register this entry type with QML.
Definition
creditdbentry.cpp:107
CreditDBEntry::mandated
QString mandated
Backing field (read via getMandated()).
Definition
creditdbentry.h:75
CreditDBEntry::section
QString section
Backing field (read via getSection()).
Definition
creditdbentry.h:70
CreditDBEntry::getMandated
QString getMandated() const
Definition
creditdbentry.cpp:53
CreditDBEntry::CreditDBEntry
CreditDBEntry()
Empty entry (protected – built by the DB).
Definition
creditdbentry.cpp:31
CreditDBEntry::qmlProtect
void qmlProtect(const QQmlEngine *const engine) const
Pin to C++ ownership (anti-GC).
Definition
creditdbentry.cpp:58
CreditDBEntry::CreditsDB
friend class CreditsDB
The owning DB constructs/populates these entries.
Definition
creditdbentry.h:77
CreditDBEntry::getSection
QString getSection() const
< Credits section heading.
Definition
creditdbentry.cpp:83
CreditDBEntry::getLicense
QString getLicense() const
Definition
creditdbentry.cpp:63
projects
db
src
pse-db
entries
creditdbentry.h
Generated by
1.17.0