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

The single QML<->C++ doorway – everything the UI touches hangs off here. More...

#include <bridge.h>

Inheritance diagram for Bridge:
Collaboration diagram for Bridge:

Public Member Functions

 Bridge (FileManagement *file)

Public Attributes

FileManagement * file = nullptr
FontKeyboard * keyboard = new FontKeyboard
Router * router = new Router
FontsDB * fonts = FontsDB::inst()
NamesPlayer * randomPlayerName = NamesPlayer::inst()
NamesPokemon * randomPokemonName = NamesPokemon::inst()
Utility * util = Utility::inst()
ExamplesPlayer * randomExamplePlayer = ExamplesPlayer::inst()
ExamplesPokemon * randomExamplePokemon = ExamplesPokemon::inst()
ExamplesRival * randomExampleRival = ExamplesRival::inst()
Settings * settings = new Settings(file->data)
RecentFilesModel * recentFilesModel = nullptr
PokedexModel * pokedexModel = nullptr
ItemStorageModel * bagItemsModel = nullptr
ItemStorageModel * pcItemsModel = nullptr
ItemOverviewModel * itemOverviewModel = nullptr
ItemExchangeModel * itemExchangeModel = nullptr
PokemonOverviewModel * pokemonOverviewModel = nullptr
ItemMarketModel * marketModel = nullptr
ItemMarketCartModel * marketCartModel = nullptr
ItemMarketViewModel * marketViewModel = nullptr
PokemonStorageModel * pokemonStorageModel1 = nullptr
PokemonStorageModel * pokemonStorageModel2 = nullptr
PokemonBoxSelectModel * pokemonBoxSelectModel1 = nullptr
PokemonBoxSelectModel * pokemonBoxSelectModel2 = nullptr
CreditsModel * creditsModel = new CreditsModel
PokemonStartersModel * starterModel = new PokemonStartersModel
ItemSelectModel * itemSelectModel = new ItemSelectModel
TypesModel * typesModel = new TypesModel
SpeciesSelectModel * speciesSelectModel = new SpeciesSelectModel
StatusSelectModel * statusSelectModel = new StatusSelectModel
NatureSelectModel * natureSelectModel = new NatureSelectModel
MoveSelectModel * moveSelectModel = new MoveSelectModel
MapSelectModel * mapSelectModel = nullptr

Detailed Description

The single QML<->C++ doorway – everything the UI touches hangs off here.

Injected into the QML context as brg, this object aggregates, as Q_PROPERTYs: the live save (file -> the data.dataExpanded.* chain QML edits), the router and settings, the shared databases/randomizers QML uses directly (fonts, names, examples, util), and the fleet of Qt item-models (mvc) that adapt C++ data into list/table form for QML views.

It is created in MainWindow and given the FileManagement; the DB-backed members are singletons (*::inst()), the models are owned here. Registered uncreatable with QML. This is the hub of the app's bridge pattern.

See also
FileManagement (the save), Router, Settings, and the mvc/ models.

Definition at line 70 of file bridge.h.

Constructor & Destructor Documentation

◆ Bridge()

Member Data Documentation

◆ bagItemsModel

ItemStorageModel* Bridge::bagItemsModel = nullptr
See also
bagItemsModel property.

Definition at line 165 of file bridge.h.

Referenced by Bridge().

◆ creditsModel

CreditsModel* Bridge::creditsModel = new CreditsModel
See also
creditsModel property.

Definition at line 177 of file bridge.h.

◆ file

FileManagement* Bridge::file = nullptr
See also
file property.

Definition at line 149 of file bridge.h.

Referenced by Bridge().

◆ fonts

FontsDB* Bridge::fonts = FontsDB::inst()
See also
fonts property.

Definition at line 154 of file bridge.h.

◆ itemExchangeModel

ItemExchangeModel* Bridge::itemExchangeModel = nullptr
See also
itemExchangeModel property.

Definition at line 168 of file bridge.h.

Referenced by Bridge().

◆ itemOverviewModel

ItemOverviewModel* Bridge::itemOverviewModel = nullptr
See also
itemOverviewModel property.

Definition at line 167 of file bridge.h.

Referenced by Bridge().

◆ itemSelectModel

ItemSelectModel* Bridge::itemSelectModel = new ItemSelectModel
See also
itemSelectModel property.

Definition at line 179 of file bridge.h.

◆ keyboard

FontKeyboard* Bridge::keyboard = new FontKeyboard
See also
keyboard property.

Definition at line 151 of file bridge.h.

◆ mapSelectModel

MapSelectModel* Bridge::mapSelectModel = nullptr
See also
mapSelectModel property.

Definition at line 185 of file bridge.h.

Referenced by Bridge().

◆ marketCartModel

ItemMarketCartModel* Bridge::marketCartModel = nullptr
See also
marketCartModel property.

Definition at line 171 of file bridge.h.

Referenced by Bridge().

◆ marketModel

ItemMarketModel* Bridge::marketModel = nullptr
See also
marketModel property.

Definition at line 170 of file bridge.h.

Referenced by Bridge().

◆ marketViewModel

ItemMarketViewModel* Bridge::marketViewModel = nullptr
See also
marketViewModel property.

Definition at line 172 of file bridge.h.

Referenced by Bridge().

◆ moveSelectModel

MoveSelectModel* Bridge::moveSelectModel = new MoveSelectModel
See also
moveSelectModel property.

Definition at line 184 of file bridge.h.

◆ natureSelectModel

NatureSelectModel* Bridge::natureSelectModel = new NatureSelectModel
See also
natureSelectModel property.

Definition at line 183 of file bridge.h.

◆ pcItemsModel

ItemStorageModel* Bridge::pcItemsModel = nullptr
See also
pcItemsModel property.

Definition at line 166 of file bridge.h.

Referenced by Bridge().

◆ pokedexModel

PokedexModel* Bridge::pokedexModel = nullptr
See also
pokedexModel property.

Definition at line 164 of file bridge.h.

Referenced by Bridge().

◆ pokemonBoxSelectModel1

PokemonBoxSelectModel* Bridge::pokemonBoxSelectModel1 = nullptr
See also
pokemonBoxSelectModel1 property.

Definition at line 175 of file bridge.h.

Referenced by Bridge().

◆ pokemonBoxSelectModel2

PokemonBoxSelectModel* Bridge::pokemonBoxSelectModel2 = nullptr
See also
pokemonBoxSelectModel2 property.

Definition at line 176 of file bridge.h.

Referenced by Bridge().

◆ pokemonOverviewModel

PokemonOverviewModel* Bridge::pokemonOverviewModel = nullptr
See also
pokemonOverviewModel property.

Definition at line 169 of file bridge.h.

Referenced by Bridge().

◆ pokemonStorageModel1

PokemonStorageModel* Bridge::pokemonStorageModel1 = nullptr
See also
pokemonStorageModel1 property.

Definition at line 173 of file bridge.h.

Referenced by Bridge().

◆ pokemonStorageModel2

PokemonStorageModel* Bridge::pokemonStorageModel2 = nullptr
See also
pokemonStorageModel2 property.

Definition at line 174 of file bridge.h.

Referenced by Bridge().

◆ randomExamplePlayer

ExamplesPlayer* Bridge::randomExamplePlayer = ExamplesPlayer::inst()
See also
randomExamplePlayer property.

Definition at line 158 of file bridge.h.

◆ randomExamplePokemon

ExamplesPokemon* Bridge::randomExamplePokemon = ExamplesPokemon::inst()
See also
randomExamplePokemon property.

Definition at line 159 of file bridge.h.

◆ randomExampleRival

ExamplesRival* Bridge::randomExampleRival = ExamplesRival::inst()
See also
randomExampleRival property.

Definition at line 160 of file bridge.h.

◆ randomPlayerName

NamesPlayer* Bridge::randomPlayerName = NamesPlayer::inst()
See also
randomPlayerName property.

Definition at line 155 of file bridge.h.

◆ randomPokemonName

NamesPokemon* Bridge::randomPokemonName = NamesPokemon::inst()
See also
randomPokemonName property.

Definition at line 156 of file bridge.h.

◆ recentFilesModel

RecentFilesModel* Bridge::recentFilesModel = nullptr
See also
recentFilesModel property.

Definition at line 163 of file bridge.h.

Referenced by Bridge().

◆ router

Router* Bridge::router = new Router
See also
router property.

Definition at line 153 of file bridge.h.

Referenced by Bridge(), and MainWindow::reloadQml().

◆ settings

Settings* Bridge::settings = new Settings(file->data)
See also
settings property.

Definition at line 161 of file bridge.h.

◆ speciesSelectModel

SpeciesSelectModel* Bridge::speciesSelectModel = new SpeciesSelectModel
See also
speciesSelectModel property.

Definition at line 181 of file bridge.h.

◆ starterModel

PokemonStartersModel* Bridge::starterModel = new PokemonStartersModel
See also
starterModel property.

Definition at line 178 of file bridge.h.

◆ statusSelectModel

StatusSelectModel* Bridge::statusSelectModel = new StatusSelectModel
See also
statusSelectModel property.

Definition at line 182 of file bridge.h.

◆ typesModel

TypesModel* Bridge::typesModel = new TypesModel
See also
typesModel property.

Definition at line 180 of file bridge.h.

◆ util

Utility* Bridge::util = Utility::inst()
See also
util property.

Definition at line 157 of file bridge.h.


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