Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
Toggle main menu visibility
Loading...
Searching...
No Matches
fontdbentry.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
class
QQmlEngine;
24
class
FontsDB
;
25
26
// With amazing help of Quicktype!!!
27
// https://app.quicktype.io
28
29
// There are 255 font options although most of them are "invalid" and thus
30
// use the tilemap.
31
43
struct
DB_AUTOPORT
FontDBEntry
:
public
QObject {
44
Q_OBJECT
45
Q_PROPERTY(
int
ind
READ
getInd
CONSTANT)
46
Q_PROPERTY(QString
name
READ
getName
CONSTANT)
47
Q_PROPERTY(
bool
shorthand
READ
getShorthand
CONSTANT)
48
Q_PROPERTY(
bool
picture
READ
getPicture
CONSTANT)
49
Q_PROPERTY(
int
length
READ
getLength
CONSTANT)
50
Q_PROPERTY(QString
alias
READ
getAlias
CONSTANT)
51
Q_PROPERTY(QString
tip
READ
getTip
CONSTANT)
52
Q_PROPERTY(
bool
control
READ
getControl
CONSTANT)
53
Q_PROPERTY(
bool
multiChar
READ
getMultiChar
CONSTANT)
54
Q_PROPERTY(
bool
variable
READ
getVariable
CONSTANT)
55
Q_PROPERTY(
bool
singleChar
READ
getSingleChar
CONSTANT)
56
Q_PROPERTY(
bool
normal
READ
getNormal
CONSTANT)
57
58
public
:
59
int
getInd
()
const
;
60
const
QString
getName
()
const
;
61
bool
getShorthand
()
const
;
62
bool
getPicture
()
const
;
63
int
getLength
()
const
;
64
const
QString
getAlias
()
const
;
65
const
QString
getTip
()
const
;
66
bool
getControl
()
const
;
67
bool
getMultiChar
()
const
;
68
bool
getVariable
()
const
;
69
bool
getSingleChar
()
const
;
70
bool
getNormal
()
const
;
71
72
public
slots:
73
void
qmlProtect
(
const
QQmlEngine*
const
engine)
const
;
74
75
protected
:
76
FontDBEntry
();
77
FontDBEntry
(
const
QJsonValue& data);
78
void
qmlRegister
()
const
;
79
80
// Optional values are only present when true, so we simplify things
81
// and mark then false unless they're present skipping dealing with variant
82
83
int
ind
= 0;
// Font Code
84
QString
name
=
""
;
// Font Output
85
bool
shorthand
=
false
;
// Is Font Output shorthand for longer output?
86
bool
picture
=
false
;
// Does this use the tilemap and not the font
87
int
length
= 0;
// Font output length or potentially maximum length
88
QString
alias
=
""
;
// Alternate font display name
89
QString
tip
=
""
;
// Font details
90
bool
control
=
false
;
// Is this a control character
91
bool
multiChar
=
false
;
// Does this output a length greater than 1
92
bool
variable
=
false
;
// Does this output a variable
93
bool
singleChar
=
false
;
// Does this output a single char
94
bool
normal
=
false
;
// Would this be an in-game accessible font char
95
96
friend
class
FontsDB
;
97
friend
class
FontSearch
;
// reads filter fields in deepLink
98
};
FontsDB
The font database – the in-game character set and the text codec.
Definition
fontsdb.h:50
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
FontDBEntry::singleChar
bool singleChar
Definition
fontdbentry.h:93
FontDBEntry::ind
int ind
Definition
fontdbentry.h:83
FontDBEntry::getPicture
bool getPicture() const
Definition
fontdbentry.cpp:75
FontDBEntry::qmlRegister
void qmlRegister() const
Register with QML.
Definition
fontdbentry.cpp:128
FontDBEntry::getTip
const QString getTip() const
Definition
fontdbentry.cpp:60
FontDBEntry::picture
bool picture
Definition
fontdbentry.h:86
FontDBEntry::getInd
int getInd() const
< Font code.
Definition
fontdbentry.cpp:90
FontDBEntry::getControl
bool getControl() const
Definition
fontdbentry.cpp:55
FontDBEntry::alias
QString alias
Definition
fontdbentry.h:88
FontDBEntry::name
QString name
Definition
fontdbentry.h:84
FontDBEntry::getName
const QString getName() const
Definition
fontdbentry.cpp:85
FontDBEntry::getLength
int getLength() const
Definition
fontdbentry.cpp:70
FontDBEntry::FontsDB
friend class FontsDB
Definition
fontdbentry.h:96
FontDBEntry::getNormal
bool getNormal() const
Definition
fontdbentry.cpp:30
FontDBEntry::variable
bool variable
Definition
fontdbentry.h:92
FontDBEntry::qmlProtect
void qmlProtect(const QQmlEngine *const engine) const
Pin to C++ ownership.
Definition
fontdbentry.cpp:35
FontDBEntry::getSingleChar
bool getSingleChar() const
Definition
fontdbentry.cpp:40
FontDBEntry::getMultiChar
bool getMultiChar() const
Definition
fontdbentry.cpp:50
FontDBEntry::FontDBEntry
FontDBEntry()
Empty entry (built by FontsDB).
Definition
fontdbentry.cpp:26
FontDBEntry::FontSearch
friend class FontSearch
Definition
fontdbentry.h:97
FontDBEntry::getVariable
bool getVariable() const
Definition
fontdbentry.cpp:45
FontDBEntry::length
int length
Definition
fontdbentry.h:87
FontDBEntry::getAlias
const QString getAlias() const
Definition
fontdbentry.cpp:65
FontDBEntry::control
bool control
Definition
fontdbentry.h:90
FontDBEntry::tip
QString tip
Definition
fontdbentry.h:89
FontDBEntry::shorthand
bool shorthand
Definition
fontdbentry.h:85
FontDBEntry::multiChar
bool multiChar
Definition
fontdbentry.h:91
FontDBEntry::normal
bool normal
Definition
fontdbentry.h:94
FontDBEntry::getShorthand
bool getShorthand() const
Definition
fontdbentry.cpp:80
projects
db
src
pse-db
entries
fontdbentry.h
Generated by
1.17.0