Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
Toggle main menu visibility
Loading...
Searching...
No Matches
abstracthiddenitemdb.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
#include <QObject>
18
#include "
./db_autoport.h
"
19
20
class
HiddenItemDBEntry
;
21
class
QQmlEngine;
22
35
class
DB_AUTOPORT
AbstractHiddenItemDB
:
public
QObject
36
{
37
Q_OBJECT
38
Q_PROPERTY(
int
getStoreSize
READ
getStoreSize
CONSTANT)
39
40
public
:
41
// Get Properties, includes QML array helpers
42
const
QVector<HiddenItemDBEntry*>
getStore
()
const
;
43
int
getStoreSize
()
const
;
44
45
Q_INVOKABLE
HiddenItemDBEntry
*
getStoreAt
(
const
int
ind)
const
;
46
47
public
slots:
48
void
load
();
49
void
deepLink
();
50
void
qmlProtect
(
const
QQmlEngine*
const
engine)
const
;
51
52
protected
slots:
53
virtual
void
qmlRegister
()
const
= 0;
54
55
protected
:
57
AbstractHiddenItemDB
(
const
QString
loadFile
);
58
59
QVector<HiddenItemDBEntry*>
store
;
60
const
QString
loadFile
;
61
};
AbstractHiddenItemDB::AbstractHiddenItemDB
AbstractHiddenItemDB(const QString loadFile)
Definition
abstracthiddenitemdb.cpp:98
AbstractHiddenItemDB::qmlProtect
void qmlProtect(const QQmlEngine *const engine) const
Pin to C++ ownership.
Definition
abstracthiddenitemdb.cpp:90
AbstractHiddenItemDB::getStoreSize
int getStoreSize() const
Entry count.
Definition
abstracthiddenitemdb.cpp:41
AbstractHiddenItemDB::loadFile
const QString loadFile
JSON asset path (set by the subclass).
Definition
abstracthiddenitemdb.h:60
AbstractHiddenItemDB::getStoreAt
HiddenItemDBEntry * getStoreAt(const int ind) const
Entry by store index (for QML).
Definition
abstracthiddenitemdb.cpp:46
AbstractHiddenItemDB::store
QVector< HiddenItemDBEntry * > store
The loaded entries.
Definition
abstracthiddenitemdb.h:59
AbstractHiddenItemDB::load
void load()
Load entries from loadFile.
Definition
abstracthiddenitemdb.cpp:54
AbstractHiddenItemDB::qmlRegister
virtual void qmlRegister() const =0
Subclass registers its concrete type with QML.
AbstractHiddenItemDB::getStore
const QVector< HiddenItemDBEntry * > getStore() const
< Number of hidden pickups.
Definition
abstracthiddenitemdb.cpp:36
AbstractHiddenItemDB::deepLink
void deepLink()
Resolve each entry's cross-DB links.
Definition
abstracthiddenitemdb.cpp:76
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
One hidden pickup's location: its map and tile coordinates.
Definition
hiddenitemdbentry.h:35
projects
db
src
pse-db
abstracthiddenitemdb.h
Generated by
1.17.0