Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
Toggle main menu visibility
Loading...
Searching...
No Matches
tmHm.h
Go to the documentation of this file.
1
/*
2
* Copyright 2019 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
18
#include <QObject>
19
#include <QString>
20
#include <QVector>
21
22
#include <
pse-common/types.h
>
23
#include "
./db_autoport.h
"
24
25
struct
ItemDBEntry
;
26
struct
MoveDBEntry
;
27
class
QQmlEngine;
28
39
// All TMs and HMs. Internally HMs are TMs starting at TM 51.
40
class
DB_AUTOPORT
TmHmsDB :
public
QObject
41
{
42
Q_OBJECT
43
Q_PROPERTY(
int
getStoreSize
READ
getStoreSize
CONSTANT)
44
45
public
:
46
static
TmHmsDB*
inst
();
47
48
[[nodiscard]]
const
QVector<QString>
getStore
()
const
;
49
[[nodiscard]]
int
getStoreSize
()
const
;
50
[[nodiscard]]
const
QVector<ItemDBEntry*>&
getTmHmItems
()
const
;
51
[[nodiscard]]
const
QVector<MoveDBEntry*>&
getTmHmMoves
()
const
;
52
53
public
slots:
54
void
load
();
55
void
deepLink
();
56
void
qmlProtect
(
const
QQmlEngine*
const
engine)
const
;
57
58
private
slots:
59
void
qmlRegister()
const
;
60
61
private
:
62
TmHmsDB();
63
64
QVector<QString> store;
65
QVector<ItemDBEntry*> toTmHmItem;
66
QVector<MoveDBEntry*> toTmHmMove;
67
};
TmHmsDB::getTmHmItems
const QVector< ItemDBEntry * > & getTmHmItems() const
The item for each TM/HM (parallel to store).
Definition
tmHm.cpp:43
TmHmsDB::getStore
const QVector< QString > getStore() const
Move names in TM/HM order.
Definition
tmHm.cpp:41
TmHmsDB::load
void load()
Load the TM/HM list from JSON.
Definition
tmHm.cpp:46
TmHmsDB::inst
static TmHmsDB * inst()
< Number of TMs+HMs.
Definition
tmHm.cpp:35
TmHmsDB::qmlProtect
void qmlProtect(const QQmlEngine *const engine) const
Pin to C++ ownership.
Definition
tmHm.cpp:75
TmHmsDB::deepLink
void deepLink()
Resolve the parallel item/move vectors.
Definition
tmHm.cpp:56
TmHmsDB::getStoreSize
int getStoreSize() const
TM+HM count.
Definition
tmHm.cpp:42
TmHmsDB::getTmHmMoves
const QVector< MoveDBEntry * > & getTmHmMoves() const
The move for each TM/HM (parallel to store).
Definition
tmHm.cpp:44
types.h
Project-wide fixed-width integer aliases (var8, var16, ...).
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
ItemDBEntry
One item's static data: name/flags, pricing, and where it's used.
Definition
itemdbentry.h:46
MoveDBEntry
One move's static data (type, power, accuracy, PP, TM/HM), with links.
Definition
moves.h:46
projects
db
src
pse-db
tmHm.h
Generated by
1.17.0