|
VR-Engage
2.3
|
Loads a QML file, stores the root item, and provides visibility, main-content visibility, and connection-page back-navigation. Derived classes implement initMain() for page-specific setup and tick() for per-frame updates. Access the shared header/footer through headerFooterUI().
#include <vreBaseUI.h>
Public Member Functions | |
| DtVreBaseUI (DtPlayerStationApp &app, const std::string &file, const std::string &target_window="") | |
| virtual | ~DtVreBaseUI () override |
| virtual void | initMain ()=0 |
| virtual void | tick (double dt)=0 |
| QQuickItem * | root () |
| DtVreHeaderFooterUI * | headerFooterUI () |
| virtual void | setVisibility (bool visible) |
| virtual bool | isVisible () |
| virtual void | close () |
| virtual void | open () |
| virtual bool | isMainContentVisible () |
| virtual void | setMainContentVisibility (bool visible) |
| DtVreMessageResult | handleBackButtonClicked (DtVreMessage *msg) |
| DtVreMessageResult | handleEscapeMessage (DtVreMessage *msg) |
Protected Member Functions | |
| virtual void | connectToHeaderFooter () |
| virtual void | onConnectionClicked () |
| virtual void | onPopupOpened () |
| virtual void | onPopupClosed () |
| virtual void | onAppModeChanged (const std::string &newAppMode, const std::string &oldAppMode) |
Protected Attributes | |
| DtPlayerStationApp & | myApp |
| QQuickItem * | myRoot |
| std::string | myTargetWindow |
| std::string | myTargetFile |
| std::string | myMainContentId |
Private Attributes | |
| DtVreHeaderFooterUI * | myHeaderFooterUI |
| makVre::DtVreBaseUI::DtVreBaseUI | ( | DtPlayerStationApp & | app, |
| const std::string & | file, | ||
| const std::string & | target_window = "" ) |
Constructor.
| app | Reference to the player station application |
| file | Path to the QML file defining the UI (relative to UI root) |
| target_window | Name of the target window (empty for default) |
Loads the specified QML file asynchronously. When loading completes, the callback sets myRoot, calls initMain(), connects to the shared header/footer, and hides the page.
|
overridevirtual |
Virtual destructor.
|
pure virtual |
Initializes page-specific QML elements.
Called once from the QML load callback after myRoot is set. Derived classes set up QML context properties, signal connections, and initial element state here.
Implemented in makVre::DtVreAppPage, makVre::DtVreChooseRolePage, makVre::DtVreHeaderFooterUI, makVre::DtVreLoadingPage, makVre::DtVreLoadingPlayerPage, makVre::DtVreSelectConnectionPage, makVre::DtVreStartPage, and makVre::DtVreWaitingPage.
|
pure virtual |
Per-frame update.
| dt | Seconds since the last frame |
Implemented in makVre::DtVreAppPage, makVre::DtVreChooseRolePage, makVre::DtVreHeaderFooterUI, makVre::DtVreLoadingPage, makVre::DtVreLoadingPlayerPage, makVre::DtVreSelectConnectionPage, makVre::DtVreStartPage, and makVre::DtVreWaitingPage.
|
virtual |
Visibility control.
Sets the visibility of this page
| visible | True to show, false to hide |
Toggles the root QML item visibility, enabled state, and focus.
Reimplemented in makVre::DtVreAppPage, makVre::DtVreChooseRolePage, makVre::DtVreHeaderFooterUI, makVre::DtVreLoadingPage, makVre::DtVreLoadingPlayerPage, makVre::DtVreSelectConnectionPage, makVre::DtVreStartPage, and makVre::DtVreWaitingPage.
|
virtual |
Checks whether this page is visible.
|
virtual |
Hides the page.
|
virtual |
Shows the page.
Referenced by makVre::DtVreHeaderFooterUI::updateModalState().
|
virtual |
Main content visibility.
|
virtual |
Main content visibility.
| DtVreMessageResult makVre::DtVreBaseUI::handleBackButtonClicked | ( | DtVreMessage * | msg | ) |
Connection-page back-navigation handlers.
Handles back-button messages while the connection page is open
| msg | The UIBackButtonClickedMessage |
| DtVreMessageResult makVre::DtVreBaseUI::handleEscapeMessage | ( | DtVreMessage * | msg | ) |
Handles escape messages while the connection page is open.
| msg | The EscapeMessage |
| QQuickItem * makVre::DtVreBaseUI::root | ( | ) |
Provides access to the root QML item.
| DtVreHeaderFooterUI * makVre::DtVreBaseUI::headerFooterUI | ( | ) |
Provides access to the shared header/footer UI.
|
protectedvirtual |
Called after initMain() in the QML load callback.
Connects this page to the shared DtVreHeaderFooterUI signals (connectionClicked, popupOpened, popupClosed, appModeChanged). Override in DtVreHeaderFooterUI to skip self-connection.
Reimplemented in makVre::DtVreHeaderFooterUI.
|
protectedvirtual |
Default handler for the connection-clicked signal.
Opens the SelectConnectionPage and registers back/escape handlers so the user can return to this page. Override in derived classes for custom behavior (e.g., hiding a panel before navigating).
Reimplemented in makVre::DtVreChooseRolePage, makVre::DtVreSelectConnectionPage, and makVre::DtVreWaitingPage.
|
protectedvirtual |
Default handler for popup-opened signal.
Called when any popup (settings, help, exit) opens in the shared header/footer. Base implementation does nothing.
Reimplemented in makVre::DtVreChooseRolePage.
|
protectedvirtual |
Default handler for popup-closed signal.
Called when any popup closes. Base implementation does nothing.
Reimplemented in makVre::DtVreChooseRolePage.
|
protectedvirtual |
Default handler for application-mode-changed signal.
| newAppMode | The new application mode identifier |
| oldAppMode | The previous application mode identifier |
Called when the application mode changes. Base implementation does nothing. Override in pages that show mode-dependent UI.
Reimplemented in makVre::DtVreChooseRolePage, makVre::DtVreSelectConnectionPage, and makVre::DtVreStartPage.
|
protected |
Reference to the player station application.
|
protected |
Pointer to the root QML item (set asynchronously after load)
|
protected |
Target window name (empty for default)
|
protected |
Relative path to the QML file.
|
protected |
Object name of the main content element in QML.
|
private |
Cached pointer to the shared header/footer UI.