|
Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
|
Screen navigation for the UI – the QML StackView's controller. More...
#include <router.h>
Public Member Functions | |
| void | changeScreen (QString name) |
Navigate to the registered screen name. | |
| void | closeScreen () |
| Close the top screen. | |
| void | manualStackPush (QString name) |
StackView-internal: push name without side effects. | |
Static Public Member Functions | |
| static void | loadScreens () |
| Register the app's screen set (called at boot). | |
Public Attributes | |
| QString | title = "" |
| bool | homeBtnShown = true |
Static Public Attributes | |
| static QVector< Screen * > | stack = QVector<Screen*>() |
| The live navigation stack. | |
| static QHash< QString, Screen * > | screens = QHash<QString, Screen*>() |
| The registry of named screens. | |
Screen navigation for the UI – the QML StackView's controller.
Holds the registry of named screens and the current navigation stack. QML drives navigation through changeScreen()/closeScreen(); the Router emits signals (goHome, openModal, closeModal, ...) that the QML shell acts on. Exposed to QML as brg.router. loadScreens() registers the app's screen set at boot.
| void Router::changeScreen | ( | QString | name | ) |
Navigate to the registered screen name.
Definition at line 35 of file router.cpp.
References homeBtnShown, screens, stack, and title.
| void Router::closeScreen | ( | ) |
Close the top screen.
Definition at line 78 of file router.cpp.
References Screen::homeBtn, homeBtnShown, Screen::modal, stack, title, and Screen::title.
|
static |
Register the app's screen set (called at boot).
Definition at line 139 of file router.cpp.
References screens.
Referenced by boot().
| void Router::manualStackPush | ( | QString | name | ) |
StackView-internal: push name without side effects.
Definition at line 114 of file router.cpp.
References homeBtnShown, screens, stack, and title.
| bool Router::homeBtnShown = true |
Definition at line 99 of file router.h.
Referenced by changeScreen(), closeScreen(), and manualStackPush().
The registry of named screens.
Definition at line 104 of file router.h.
Referenced by changeScreen(), loadScreens(), and manualStackPush().
The live navigation stack.
Definition at line 103 of file router.h.
Referenced by changeScreen(), closeScreen(), and manualStackPush().
| QString Router::title = "" |
Definition at line 98 of file router.h.
Referenced by changeScreen(), closeScreen(), and manualStackPush().