Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
Toggle main menu visibility
Loading...
Searching...
No Matches
gamecornerdbentry.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 <QString>
19
#include <QJsonValue>
20
#include "
../db_autoport.h
"
21
22
struct
PokemonDBEntry
;
23
struct
ItemDBEntry
;
24
class
QQmlEngine;
25
class
GameCornerDB
;
26
27
37
struct
DB_AUTOPORT
GameCornerDBEntry
:
public
QObject {
38
Q_OBJECT
39
Q_PROPERTY(QString
getName
READ
getName
CONSTANT)
40
Q_PROPERTY(QString
getType
READ
getType
CONSTANT)
41
Q_PROPERTY(
int
getPrice
READ
getPrice
CONSTANT)
42
Q_PROPERTY(
int
getLevel
READ
getLevel
CONSTANT)
43
Q_PROPERTY(
PokemonDBEntry
*
getToPokemon
READ
getToPokemon
CONSTANT)
44
Q_PROPERTY(
ItemDBEntry
*
getToItem
READ
getToItem
CONSTANT)
45
46
public
:
47
QString
getName
()
const
;
48
QString
getType
()
const
;
49
int
getPrice
()
const
;
50
int
getLevel
()
const
;
51
PokemonDBEntry
*
getToPokemon
()
const
;
52
ItemDBEntry
*
getToItem
()
const
;
53
54
public
slots:
55
void
qmlProtect
(
const
QQmlEngine*
const
engine)
const
;
56
57
protected
:
58
GameCornerDBEntry
();
59
GameCornerDBEntry
(
const
QJsonValue& data);
60
void
deepLink
();
61
void
qmlRegister
()
const
;
62
63
QString
name
=
""
;
64
QString
type
=
""
;
65
int
price
= 0;
66
int
level
= 0;
67
PokemonDBEntry
*
toPokemon
=
nullptr
;
68
ItemDBEntry
*
toItem
=
nullptr
;
69
70
friend
class
GameCornerDB
;
71
};
GameCornerDB
The Game Corner database – prize entries plus the coin exchange rate.
Definition
gamecornerdb.h:35
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
GameCornerDBEntry::getType
QString getType() const
Definition
gamecornerdbentry.cpp:121
GameCornerDBEntry::qmlRegister
void qmlRegister() const
Register with QML.
Definition
gamecornerdbentry.cpp:85
GameCornerDBEntry::price
int price
Backing field (read via getPrice()).
Definition
gamecornerdbentry.h:65
GameCornerDBEntry::toPokemon
PokemonDBEntry * toPokemon
Resolved Pokemon prize (deepLink).
Definition
gamecornerdbentry.h:67
GameCornerDBEntry::qmlProtect
void qmlProtect(const QQmlEngine *const engine) const
Pin to C++ ownership.
Definition
gamecornerdbentry.cpp:101
GameCornerDBEntry::getLevel
int getLevel() const
Definition
gamecornerdbentry.cpp:111
GameCornerDBEntry::getName
QString getName() const
< Prize name.
Definition
gamecornerdbentry.cpp:126
GameCornerDBEntry::deepLink
void deepLink()
Resolve the Pokemon/item link.
Definition
gamecornerdbentry.cpp:50
GameCornerDBEntry::level
int level
Backing field (read via getLevel()).
Definition
gamecornerdbentry.h:66
GameCornerDBEntry::GameCornerDBEntry
GameCornerDBEntry()
Empty entry (built by GameCornerDB).
Definition
gamecornerdbentry.cpp:32
GameCornerDBEntry::GameCornerDB
friend class GameCornerDB
Owning DB constructs/populates entries.
Definition
gamecornerdbentry.h:70
GameCornerDBEntry::getPrice
int getPrice() const
Definition
gamecornerdbentry.cpp:116
GameCornerDBEntry::getToPokemon
PokemonDBEntry * getToPokemon() const
Definition
gamecornerdbentry.cpp:106
GameCornerDBEntry::type
QString type
Backing field (read via getType()).
Definition
gamecornerdbentry.h:64
GameCornerDBEntry::name
QString name
Backing field (read via getName()).
Definition
gamecornerdbentry.h:63
GameCornerDBEntry::getToItem
ItemDBEntry * getToItem() const
Definition
gamecornerdbentry.cpp:96
GameCornerDBEntry::toItem
ItemDBEntry * toItem
Resolved item prize (deepLink).
Definition
gamecornerdbentry.h:68
ItemDBEntry
One item's static data: name/flags, pricing, and where it's used.
Definition
itemdbentry.h:46
PokemonDBEntry
One species' complete static data – the richest entry in the db layer.
Definition
pokemon.h:98
projects
db
src
pse-db
entries
gamecornerdbentry.h
Generated by
1.17.0