Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
Loading...
Searching...
No Matches
TilesetDB Class Reference

The tilesets database, keyed by name. More...

#include <tileset.h>

Inheritance diagram for TilesetDB:
Collaboration diagram for TilesetDB:

Public Member Functions

const QVector< TilesetDBEntry * > getStore () const
 All tilesets.
const QHash< QString, TilesetDBEntry * > getInd () const
 Name->entry index.
int getStoreSize () const
 Tileset count.
TilesetDBEntrygetStoreAt (int idx) const
 Tileset by store index (for QML).
TilesetDBEntrygetIndAt (const QString &key) const
 Tileset by name key (for QML).
void load ()
 Load tilesets from JSON.
void index ()
 Build the name->entry index.
void qmlProtect (const QQmlEngine *const engine) const
 Pin to C++ ownership.

Static Public Member Functions

static TilesetDBinst ()
 < Number of tilesets.

Detailed Description

The tilesets database, keyed by name.

Standard DB-singleton with a name index (see CreditsDB / db.md).

See also
TilesetDBEntry, DB.

Definition at line 74 of file tileset.h.

Member Function Documentation

◆ getInd()

const QHash< QString, TilesetDBEntry * > TilesetDB::getInd ( ) const
nodiscard

Name->entry index.

Definition at line 63 of file tileset.cpp.

◆ getIndAt()

TilesetDBEntry * TilesetDB::getIndAt ( const QString & key) const

Tileset by name key (for QML).

Definition at line 72 of file tileset.cpp.

Referenced by MapDBEntry::deepLink().

◆ getStore()

const QVector< TilesetDBEntry * > TilesetDB::getStore ( ) const
nodiscard

All tilesets.

Definition at line 62 of file tileset.cpp.

◆ getStoreAt()

TilesetDBEntry * TilesetDB::getStoreAt ( int idx) const

Tileset by store index (for QML).

Definition at line 66 of file tileset.cpp.

◆ getStoreSize()

int TilesetDB::getStoreSize ( ) const
nodiscard

Tileset count.

Definition at line 64 of file tileset.cpp.

◆ index()

void TilesetDB::index ( )

Build the name->entry index.

Definition at line 87 of file tileset.cpp.

◆ inst()

TilesetDB * TilesetDB::inst ( )
static

< Number of tilesets.

The process-wide TilesetDB singleton.

Definition at line 56 of file tileset.cpp.

Referenced by MapDBEntry::deepLink(), DB::qmlProtect(), and DB::tilesets().

◆ load()

void TilesetDB::load ( )

Load tilesets from JSON.

Definition at line 77 of file tileset.cpp.

References GameData::inst(), and GameData::json().

◆ qmlProtect()

void TilesetDB::qmlProtect ( const QQmlEngine *const engine) const

Pin to C++ ownership.

Definition at line 98 of file tileset.cpp.

References Utility::qmlProtectUtil().

Referenced by DB::qmlProtect().


The documentation for this class was generated from the following files: