|
Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
|
The Qt executable (projects/app/src) – the boot sequence, the QML<->C++ bridge, image/engine providers, and the Qt item-models that feed the QML views. The QML UI itself lives in projects/app/ui (documented separately; see ../reference/documentation.md for why QML isn't in the generated docs). See the macro picture in overview.md.
| Part | What |
|---|---|
| main.cpp | Entry point – return boot(argc, argv)->exec();. |
| boot/ | The bootstrap: boot.cpp (sequence), bootDatabase.cpp (DB::inst()), bootQmlLinkage.cpp (register every type with QML). |
| bridge/ | Bridge (the brg aggregate), Router (screen nav), Settings (theme/layout). |
| engine/ | QQuickImageProviders + helpers that render font/tileset previews for QML. |
| mvc/ | ~17 QAbstractListModel subclasses adapting C++ data into list/table form for QML views. |
main() -> boot() runs, in order: bootDatabase() (brings up the whole db layer), bootQmlLinkage() (registers every C++ type/enum with QML – long and deliberately repetitive because Qt's meta-system rejects helpers there), Router::loadScreens() (registers the screen set), then createApp() which creates the QApplication and shows the MainWindow. Full detail in overview.md.
Bridge is injected into the QML context as brg and is the single doorway between QML and C++. Off it hang:
For QML to traverse brg.file.data.dataExpanded.*, every QObject in that chain must be a complete type at the property's MOC TU – the rule documented in savefile.md and ../reference/qt-patterns.md.
Note – MainWindow: the QQuickWidget host MainWindow is C++ but lives under projects/app/ui/window (with the QML). It is documented and now included in the Doxygen docs via a dedicated projects/app/ui/window entry in the Doxyfile INPUT (the QML itself, app/ui/app, stays out). This is the one C++ class outside app/src.
Documentation status: boot + bridge spine done (main, boot/*, bridge.h, router.h, settings.h). engine/, mvc/, and the .cpp are in progress – tracked in ../reference/documentation.md.