Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
Toggle main menu visibility
Loading...
Searching...
No Matches
mapdbentrywarpin.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
MapDBEntry
;
23
class
MapsDB
;
24
class
MapDBEntryWarpOut
;
25
35
struct
DB_AUTOPORT
MapDBEntryWarpIn
:
public
QObject {
36
Q_OBJECT
37
Q_PROPERTY(
int
getX
READ
getX
CONSTANT)
38
Q_PROPERTY(
int
getY
READ
getY
CONSTANT)
39
Q_PROPERTY(
int
getToConnectingWarpsSize
READ
getToConnectingWarpsSize
CONSTANT)
40
Q_PROPERTY(
MapDBEntry
*
getParent
READ
getParent
CONSTANT)
41
42
public
:
43
int
getX
()
const
;
44
int
getY
()
const
;
45
46
const
QVector<MapDBEntryWarpOut*>
getToConnectingWarps
()
const
;
47
int
getToConnectingWarpsSize
()
const
;
48
Q_INVOKABLE
MapDBEntryWarpOut
*
getToConnectingWarpsAt
(
const
int
ind)
const
;
49
50
MapDBEntry
*
getParent
()
const
;
51
52
public
slots:
53
void
qmlProtect
(
const
QQmlEngine*
const
engine)
const
;
54
55
protected
:
56
MapDBEntryWarpIn
();
57
MapDBEntryWarpIn
(
const
QJsonValue& data,
MapDBEntry
*
const
parent
);
58
void
qmlRegister
()
const
;
59
60
// X & Y location on Map
61
int
x
= 0;
62
int
y
= 0;
63
64
QVector<MapDBEntryWarpOut*>
toConnectingWarps
;
65
MapDBEntry
*
parent
=
nullptr
;
66
67
friend
class
MapDBEntry
;
68
friend
class
MapsDB
;
69
friend
class
MapDBEntryWarpOut
;
70
};
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
MapDBEntryWarpIn::getX
int getX() const
< Warp-in tile X.
Definition
mapdbentrywarpin.cpp:83
MapDBEntryWarpIn::getToConnectingWarpsSize
int getToConnectingWarpsSize() const
Definition
mapdbentrywarpin.cpp:65
MapDBEntryWarpIn::qmlRegister
void qmlRegister() const
Register with QML.
Definition
mapdbentrywarpin.cpp:39
MapDBEntryWarpIn::y
int y
Warp-in tile Y.
Definition
mapdbentrywarpin.h:62
MapDBEntryWarpIn::MapDBEntry
friend class MapDBEntry
Definition
mapdbentrywarpin.h:67
MapDBEntryWarpIn::getY
int getY() const
Definition
mapdbentrywarpin.cpp:78
MapDBEntryWarpIn::toConnectingWarps
QVector< MapDBEntryWarpOut * > toConnectingWarps
Warp-outs arriving here (filled by warp-out deepLink).
Definition
mapdbentrywarpin.h:64
MapDBEntryWarpIn::MapDBEntryWarpIn
MapDBEntryWarpIn()
Empty entry.
Definition
mapdbentrywarpin.cpp:27
MapDBEntryWarpIn::MapsDB
friend class MapsDB
Definition
mapdbentrywarpin.h:68
MapDBEntryWarpIn::parent
MapDBEntry * parent
Owning map.
Definition
mapdbentrywarpin.h:65
MapDBEntryWarpIn::qmlProtect
void qmlProtect(const QQmlEngine *const engine) const
Pin to C++ ownership.
Definition
mapdbentrywarpin.cpp:55
MapDBEntryWarpIn::MapDBEntryWarpOut
friend class MapDBEntryWarpOut
Definition
mapdbentrywarpin.h:69
MapDBEntryWarpIn::getToConnectingWarpsAt
MapDBEntryWarpOut * getToConnectingWarpsAt(const int ind) const
Connecting warp ind (for QML).
Definition
mapdbentrywarpin.cpp:70
MapDBEntryWarpIn::getParent
MapDBEntry * getParent() const
Definition
mapdbentrywarpin.cpp:50
MapDBEntryWarpIn::getToConnectingWarps
const QVector< MapDBEntryWarpOut * > getToConnectingWarps() const
Warp-outs that land here.
Definition
mapdbentrywarpin.cpp:60
MapDBEntryWarpIn::x
int x
Warp-in tile X.
Definition
mapdbentrywarpin.h:61
MapDBEntryWarpOut
A warp-out point: a tile that warps the player to another map.
Definition
mapdbentrywarpout.h:37
MapDBEntry
One map's complete static definition – the root of the MapDBEntry family.
Definition
mapdbentry.h:56
projects
db
src
pse-db
entries
mapdbentrywarpin.h
Generated by
1.17.0