Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
Toggle main menu visibility
Loading...
Searching...
No Matches
flydbentry.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
21
#include "
../db_autoport.h
"
22
23
struct
MapDBEntry
;
24
class
QQmlEngine;
25
class
FlyDB
;
26
27
// Qt 6 requires complete types for Q_PROPERTY pointers, OR this macro:
28
37
struct
DB_AUTOPORT
FlyDBEntry
:
public
QObject {
38
Q_OBJECT
39
Q_PROPERTY(QString
getName
READ
getName
CONSTANT)
40
Q_PROPERTY(
int
getInd
READ
getInd
CONSTANT)
41
Q_PROPERTY(
MapDBEntry
*
getToMap
READ
getToMap
CONSTANT)
42
43
public
:
44
QString
getName
()
const
;
45
int
getInd
()
const
;
46
MapDBEntry
*
getToMap
()
const
;
47
48
public
slots:
49
void
qmlProtect
(
const
QQmlEngine*
const
engine)
const
;
50
51
protected
:
52
FlyDBEntry
();
53
FlyDBEntry
(QJsonValue& data);
54
void
deepLink
();
55
void
qmlRegister
()
const
;
56
57
QString
name
=
""
;
58
int
ind
= 0;
59
MapDBEntry
*
toMap
=
nullptr
;
60
61
friend
class
FlyDB
;
62
};
FlyDB
The fly-destinations database – where Fly can take you, keyed by name.
Definition
flydb.h:38
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
FlyDBEntry::getInd
int getInd() const
Definition
flydbentry.cpp:66
FlyDBEntry::getName
QString getName() const
< Destination name.
Definition
flydbentry.cpp:71
FlyDBEntry::qmlRegister
void qmlRegister() const
Register with QML.
Definition
flydbentry.cpp:76
FlyDBEntry::FlyDB
friend class FlyDB
The owning DB constructs/populates these entries.
Definition
flydbentry.h:61
FlyDBEntry::name
QString name
Backing field (read via getName()).
Definition
flydbentry.h:57
FlyDBEntry::ind
int ind
Backing field (read via getInd()).
Definition
flydbentry.h:58
FlyDBEntry::toMap
MapDBEntry * toMap
Backing field (read via getToMap()).
Definition
flydbentry.h:59
FlyDBEntry::getToMap
MapDBEntry * getToMap() const
Definition
flydbentry.cpp:56
FlyDBEntry::qmlProtect
void qmlProtect(const QQmlEngine *const engine) const
Pin to C++ ownership.
Definition
flydbentry.cpp:61
FlyDBEntry::deepLink
void deepLink()
Resolve the destination map.
Definition
flydbentry.cpp:43
FlyDBEntry::FlyDBEntry
FlyDBEntry()
Empty entry (built by FlyDB).
Definition
flydbentry.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
flydbentry.h
Generated by
1.17.0