|
Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
|
The maps database – every map and its full layout, keyed by name. More...
#include <mapsdb.h>
Public Member Functions | |
| const QVector< MapDBEntry * > | getStore () const |
| All maps. | |
| const QHash< QString, MapDBEntry * > | getInd () const |
| Name->map index. | |
| int | getStoreSize () const |
| Map count. | |
| MapSearch * | searchRaw () const |
| Raw finder for QML (QML-managed ownership). | |
| QScopedPointer< MapSearch, QScopedPointerDeleteLater > | search () const |
| C++-owned finder (smart pointer). | |
| MapDBEntry * | getStoreAt (const int ind) const |
| Map by store index (for QML). | |
| MapDBEntry * | getIndAt (const QString val) const |
| Map by name key (for QML). | |
| void | load () |
| Load maps from JSON. | |
| void | index () |
| Build the name->map index. | |
| void | deepLink () |
| Resolve every map's warps/sprites/connections/etc. | |
| void | qmlProtect (const QQmlEngine *const engine) const |
| Pin to C++ ownership. | |
Static Public Member Functions | |
| static MapsDB * | inst () |
| < Number of maps. | |
The maps database – every map and its full layout, keyed by name.
The largest entry family in the project: each MapDBEntry (in entries/) carries a map's size, connections, warps, signs, sprites, tileset, music, and wild encounters. MapsDB is otherwise a standard DB-singleton with a name index and a deepLink() pass, plus a MapSearch finder (like FontsDB) – search / searchRaw differ only in ownership (C++ smart-pointer vs QML-managed raw).
| void MapsDB::deepLink | ( | ) |
Resolve every map's warps/sprites/connections/etc.
Definition at line 98 of file mapsdb.cpp.
| const QHash< QString, MapDBEntry * > MapsDB::getInd | ( | ) | const |
Name->map index.
Definition at line 46 of file mapsdb.cpp.
Referenced by MapDBEntry::deepLink(), MapDBEntryConnect::deepLink(), MapDBEntryWarpOut::deepLink(), and MissableDBEntry::deepLink().
| MapDBEntry * MapsDB::getIndAt | ( | const QString | val | ) | const |
Map by name key (for QML).
Definition at line 155 of file mapsdb.cpp.
Referenced by Settings::dataChanged(), EventDBEntry::deepLink(), FlyDBEntry::deepLink(), HiddenItemDBEntry::deepLink(), ScriptDBEntry::deepLink(), MapSelectModel::rebuild(), AreaMap::toCurMap(), MapConnData::toMap(), and WarpData::toMap().
| const QVector< MapDBEntry * > MapsDB::getStore | ( | ) | const |
All maps.
Definition at line 41 of file mapsdb.cpp.
| MapDBEntry * MapsDB::getStoreAt | ( | const int | ind | ) | const |
Map by store index (for QML).
Definition at line 147 of file mapsdb.cpp.
| int MapsDB::getStoreSize | ( | ) | const |
Map count.
Definition at line 51 of file mapsdb.cpp.
| void MapsDB::index | ( | ) |
Build the name->map index.
Definition at line 78 of file mapsdb.cpp.
|
static |
< Number of maps.
A fresh map finder (QML-managed; see note). The process-wide MapsDB singleton.
Definition at line 35 of file mapsdb.cpp.
Referenced by Settings::dataChanged(), EventDBEntry::deepLink(), FlyDBEntry::deepLink(), HiddenItemDBEntry::deepLink(), MapDBEntry::deepLink(), MapDBEntryConnect::deepLink(), MapDBEntryWarpOut::deepLink(), MissableDBEntry::deepLink(), ScriptDBEntry::deepLink(), DB::maps(), DB::qmlProtect(), Area::randomize(), AreaWarps::randomize(), WarpData::randomize(), MapSelectModel::rebuild(), AreaWarps::setTo(), MapSearch::startOver(), AreaMap::toCurMap(), MapConnData::toMap(), and WarpData::toMap().
| void MapsDB::load | ( | ) |
Load maps from JSON.
Definition at line 56 of file mapsdb.cpp.
References GameData::inst(), GameData::json(), and MapDBEntry.
| void MapsDB::qmlProtect | ( | const QQmlEngine *const | engine | ) | const |
Pin to C++ ownership.
Definition at line 112 of file mapsdb.cpp.
References Utility::qmlProtectUtil().
Referenced by DB::qmlProtect().
| QScopedPointer< MapSearch, QScopedPointerDeleteLater > MapsDB::search | ( | ) | const |
C++-owned finder (smart pointer).
Definition at line 141 of file mapsdb.cpp.
Referenced by Area::randomize(), AreaWarps::randomize(), WarpData::randomize(), and AreaWarps::setTo().
| MapSearch * MapsDB::searchRaw | ( | ) | const |
Raw finder for QML (QML-managed ownership).
Definition at line 136 of file mapsdb.cpp.