Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
Toggle main menu visibility
Loading...
Searching...
No Matches
mapdbentrywildmon.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 <QJsonValue>
19
#include "
../db_autoport.h
"
20
21
class
QQmlEngine;
22
class
MapsDB
;
23
class
MapDBEntry
;
24
class
PokemonDBEntry
;
25
26
// Wild Pokemon Entry
35
struct
DB_AUTOPORT
MapDBEntryWildMon
:
public
QObject {
36
Q_OBJECT
37
Q_PROPERTY(QString
getName
READ
getName
CONSTANT)
38
Q_PROPERTY(
int
getLevel
READ
getLevel
CONSTANT)
39
Q_PROPERTY(
PokemonDBEntry
*
getToPokemon
READ
getToPokemon
CONSTANT)
40
Q_PROPERTY(
MapDBEntry
*
getParent
READ
getParent
CONSTANT)
41
42
public
:
43
const
QString
getName
()
const
;
44
int
getLevel
()
const
;
45
PokemonDBEntry
*
getToPokemon
()
const
;
46
MapDBEntry
*
getParent
()
const
;
47
48
public
slots:
49
void
qmlProtect
(
const
QQmlEngine*
const
engine)
const
;
50
51
protected
:
52
MapDBEntryWildMon
();
53
MapDBEntryWildMon
(
const
QJsonValue& value,
MapDBEntry
*
const
parent
);
54
void
deepLink
();
55
void
qmlRegister
()
const
;
56
57
QString
name
=
""
;
58
int
level
= 0;
59
60
PokemonDBEntry
*
toPokemon
=
nullptr
;
61
MapDBEntry
*
parent
=
nullptr
;
62
63
friend
class
MapsDB
;
64
friend
class
MapDBEntry
;
65
};
MapsDB
The maps database – every map and its full layout, keyed by name.
Definition
mapsdb.h:41
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
MapDBEntryWildMon::deepLink
void deepLink()
Resolve the species link.
Definition
mapdbentrywildmon.cpp:41
MapDBEntryWildMon::MapDBEntry
friend class MapDBEntry
Definition
mapdbentrywildmon.h:64
MapDBEntryWildMon::MapDBEntryWildMon
MapDBEntryWildMon()
Empty entry.
Definition
mapdbentrywildmon.cpp:28
MapDBEntryWildMon::getToPokemon
PokemonDBEntry * getToPokemon() const
Definition
mapdbentrywildmon.cpp:78
MapDBEntryWildMon::MapsDB
friend class MapsDB
Definition
mapdbentrywildmon.h:63
MapDBEntryWildMon::getLevel
int getLevel() const
Definition
mapdbentrywildmon.cpp:83
MapDBEntryWildMon::parent
MapDBEntry * parent
Owning map.
Definition
mapdbentrywildmon.h:61
MapDBEntryWildMon::name
QString name
Species name.
Definition
mapdbentrywildmon.h:57
MapDBEntryWildMon::toPokemon
PokemonDBEntry * toPokemon
Resolved species (deepLink).
Definition
mapdbentrywildmon.h:60
MapDBEntryWildMon::getName
const QString getName() const
< Species name.
Definition
mapdbentrywildmon.cpp:88
MapDBEntryWildMon::qmlRegister
void qmlRegister() const
Register with QML.
Definition
mapdbentrywildmon.cpp:57
MapDBEntryWildMon::level
int level
Encounter level.
Definition
mapdbentrywildmon.h:58
MapDBEntryWildMon::qmlProtect
void qmlProtect(const QQmlEngine *const engine) const
Pin to C++ ownership.
Definition
mapdbentrywildmon.cpp:73
MapDBEntryWildMon::getParent
MapDBEntry * getParent() const
Definition
mapdbentrywildmon.cpp:68
MapDBEntry
One map's complete static definition – the root of the MapDBEntry family.
Definition
mapdbentry.h:56
PokemonDBEntry
One species' complete static data – the richest entry in the db layer.
Definition
pokemon.h:98
projects
db
src
pse-db
entries
mapdbentrywildmon.h
Generated by
1.17.0