Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
Toggle main menu visibility
Loading...
Searching...
No Matches
hiddenitemdbentry.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
MapDBEntry
;
23
class
AbstractHiddenItemDB
;
24
class
QQmlEngine;
25
26
35
struct
DB_AUTOPORT
HiddenItemDBEntry
:
public
QObject {
36
Q_OBJECT
37
Q_PROPERTY(QString
getMap
READ
getMap
CONSTANT)
38
Q_PROPERTY(
int
getX
READ
getX
CONSTANT)
39
Q_PROPERTY(
int
getY
READ
getY
CONSTANT)
40
Q_PROPERTY(
MapDBEntry
*
getToMap
READ
getToMap
CONSTANT)
41
42
public
:
43
QString
getMap
()
const
;
44
int
getX
()
const
;
45
int
getY
()
const
;
46
MapDBEntry
*
getToMap
()
const
;
47
48
public
slots:
49
void
qmlProtect
(
const
QQmlEngine*
const
engine)
const
;
50
51
protected
:
52
HiddenItemDBEntry
();
53
HiddenItemDBEntry
(
const
QJsonValue& data);
54
void
deepLink
();
55
void
qmlRegister
()
const
;
56
57
QString
map
=
""
;
58
int
x
= 0;
59
int
y
= 0;
60
MapDBEntry
*
toMap
=
nullptr
;
61
62
friend
class
AbstractHiddenItemDB
;
63
};
AbstractHiddenItemDB
Shared base for the two hidden-pickup databases (items and coins).
Definition
abstracthiddenitemdb.h:36
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
HiddenItemDBEntry::qmlRegister
void qmlRegister() const
Register with QML.
Definition
hiddenitemdbentry.cpp:57
HiddenItemDBEntry::qmlProtect
void qmlProtect(const QQmlEngine *const engine) const
Pin to C++ ownership.
Definition
hiddenitemdbentry.cpp:88
HiddenItemDBEntry::toMap
MapDBEntry * toMap
Resolved map (deepLink).
Definition
hiddenitemdbentry.h:60
HiddenItemDBEntry::getMap
QString getMap() const
< Map name the pickup is on.
Definition
hiddenitemdbentry.cpp:68
HiddenItemDBEntry::deepLink
void deepLink()
Resolve the map link.
Definition
hiddenitemdbentry.cpp:44
HiddenItemDBEntry::map
QString map
Backing field (read via getMap()).
Definition
hiddenitemdbentry.h:57
HiddenItemDBEntry::getToMap
MapDBEntry * getToMap() const
Definition
hiddenitemdbentry.cpp:83
HiddenItemDBEntry::x
int x
Backing field (read via getX()).
Definition
hiddenitemdbentry.h:58
HiddenItemDBEntry::getX
int getX() const
Definition
hiddenitemdbentry.cpp:73
HiddenItemDBEntry::y
int y
Backing field (read via getY()).
Definition
hiddenitemdbentry.h:59
HiddenItemDBEntry::AbstractHiddenItemDB
friend class AbstractHiddenItemDB
Owning DB constructs/populates entries.
Definition
hiddenitemdbentry.h:62
HiddenItemDBEntry::getY
int getY() const
Definition
hiddenitemdbentry.cpp:78
HiddenItemDBEntry::HiddenItemDBEntry
HiddenItemDBEntry()
Empty entry (built by the DB).
Definition
hiddenitemdbentry.cpp:30
MapDBEntry
One map's complete static definition – the root of the MapDBEntry family.
Definition
mapdbentry.h:56
projects
db
src
pse-db
entries
hiddenitemdbentry.h
Generated by
1.17.0