Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
Toggle main menu visibility
Loading...
Searching...
No Matches
mapdbentrysign.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
MapDBEntry
;
22
class
QQmlEngine;
23
class
MapDBEntry
;
24
32
struct
DB_AUTOPORT
MapDBEntrySign
:
public
QObject
33
{
34
Q_OBJECT
35
Q_PROPERTY(
int
getX
READ
getX
CONSTANT)
36
Q_PROPERTY(
int
getY
READ
getY
CONSTANT)
37
Q_PROPERTY(
int
getTextID
READ
getTextID
CONSTANT)
38
Q_PROPERTY(
MapDBEntry
*
getParent
READ
getParent
CONSTANT)
39
40
public
:
41
int
getX
()
const
;
42
int
getY
()
const
;
43
int
getTextID
()
const
;
44
MapDBEntry
*
getParent
()
const
;
45
46
public
slots:
47
void
qmlProtect
(
const
QQmlEngine*
const
engine)
const
;
48
49
protected
:
50
MapDBEntrySign
();
51
MapDBEntrySign
(
const
QJsonValue& data,
52
MapDBEntry
*
const
parent
);
53
void
qmlRegister
()
const
;
54
55
// X & Y location on Map
56
int
x
= 0;
57
int
y
= 0;
58
59
// Which text id to display when interacting with sign
60
int
textID
= 0;
61
62
MapDBEntry
*
parent
=
nullptr
;
63
64
friend
class
MapDBEntry
;
65
};
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
MapDBEntrySign::getY
int getY() const
Definition
mapdbentrysign.cpp:45
MapDBEntrySign::getTextID
int getTextID() const
Definition
mapdbentrysign.cpp:40
MapDBEntrySign::MapDBEntry
friend class MapDBEntry
Definition
mapdbentrysign.h:64
MapDBEntrySign::y
int y
Sign tile Y.
Definition
mapdbentrysign.h:57
MapDBEntrySign::qmlProtect
void qmlProtect(const QQmlEngine *const engine) const
Pin to C++ ownership.
Definition
mapdbentrysign.cpp:35
MapDBEntrySign::textID
int textID
Text id shown when read.
Definition
mapdbentrysign.h:60
MapDBEntrySign::x
int x
Sign tile X.
Definition
mapdbentrysign.h:56
MapDBEntrySign::parent
MapDBEntry * parent
Owning map.
Definition
mapdbentrysign.h:62
MapDBEntrySign::getParent
MapDBEntry * getParent() const
Definition
mapdbentrysign.cpp:30
MapDBEntrySign::qmlRegister
void qmlRegister() const
Register with QML.
Definition
mapdbentrysign.cpp:63
MapDBEntrySign::getX
int getX() const
< Sign tile X.
Definition
mapdbentrysign.cpp:50
MapDBEntrySign::MapDBEntrySign
MapDBEntrySign()
Empty entry.
Definition
mapdbentrysign.cpp:26
MapDBEntry
One map's complete static definition – the root of the MapDBEntry family.
Definition
mapdbentry.h:56
projects
db
src
pse-db
entries
mapdbentrysign.h
Generated by
1.17.0