|
VR-Engage
2.2
|
DtVreAppPage implements the main application page displayed when a user is engaged with a role in VR-Engage. It provides access to session management, role selection, and application control through a QML-based user interface. The page includes information about the current entity, role, session, and scenario, and provides buttons for navigation to other parts of the application.
#include <vreAppPage.h>
Public Member Functions | |
| DtVreAppPage (DtPlayerStationApp &app, const std::string &target_window="") | |
| virtual | ~DtVreAppPage () override |
| virtual void | tick (double dt) override |
| virtual void | initMain () override |
| virtual void | setVisibility (bool visible) override |
| virtual void | setChooseRoleBtnState (bool enable) |
| virtual void | setReturnBtnState (bool enable) |
| virtual void | setChooseSessionBtnState (bool enableBtn, bool enableDialog) |
| virtual void | setTerrain (const std::string &terrain) |
| virtual void | setScenario (const std::string &scenario) |
| virtual void | setSessionType (const QString &type) |
| virtual void | refreshMenus () |
Public Member Functions inherited from makVre::DtVreHeaderFooterUIBase | |
| DtVreHeaderFooterUIBase (DtPlayerStationApp &app, const std::string &file, const std::string &target_window="") | |
| DtVreHeaderFooterUIBase (DtPlayerStationApp &app, const std::string &file, const std::string &headerId, const std::string &footerId, const std::string &mainContentId, const std::string &target_window) | |
| virtual | ~DtVreHeaderFooterUIBase () override |
| QQuickItem * | root () |
| virtual bool | isVisible () |
| virtual void | close () |
| virtual void | open () |
| virtual void | initHeader () |
| virtual bool | isHeaderVisible () |
| virtual void | setHeaderVisiblility (bool visible) |
| virtual void | setMenuTitle (const QString &title) |
| virtual void | setShowCutoutVisible (bool visible) |
| virtual void | setButtonEnabled (const std::string &id, bool enabled) |
| virtual bool | isButtonEnabled (const std::string &id) |
| virtual void | setAllCutoutControlsEnabled (bool enabled) |
| virtual void | setShowTopRightControlsVisible (bool visible) |
| virtual void | initFooter () |
| virtual bool | isFooterVisible () |
| virtual void | setFooterVisiblility (bool visible) |
| virtual void | setShowBottomBackButtonVisible (bool visible) |
| virtual bool | isMainContentVisible () |
| virtual void | setMainContentVisibility (bool visible) |
| virtual void | registerMessageHandlers () |
| virtual void | deregisterMessageHandlers () |
| DtVreMessageResult | handleBackButtonClicked (DtVreMessage *msg) |
| DtVreMessageResult | handleEscapeMessage (DtVreMessage *msg) |
Protected Member Functions | |
| virtual void | runningStateUpdated (bool runState) override |
Protected Member Functions inherited from makVre::DtVreHeaderFooterUIBase | |
| virtual void | closeAllSettingsPages (std::string pageName="") |
| virtual void | appModeUpdated (const std::string &newAppMode, const std::string &oldAppMode) |
| virtual void | updateModalState (bool open) |
| DtVreMessageResult | handleApplicationMode (DtVreMessage *msg) |
| DtVreMessageResult | handleSessionPlayState (DtVreMessage *msg) |
| DtVreMessageResult | handleToggleHelp (DtVreMessage *msg) |
Additional Inherited Members | |
Protected Attributes inherited from makVre::DtVreHeaderFooterUIBase | |
| DtPlayerStationApp & | myApp |
| QQuickItem * | myRoot |
| std::string | myTargetWindow |
| std::string | myTargetFile |
| std::string | myHeaderId |
| std::string | myFooterId |
| std::string | myMainContentId |
| makVre::DtVreAppPage::DtVreAppPage | ( | DtPlayerStationApp & | app, |
| const std::string & | target_window = "" ) |
Constructor.
| app | Reference to the player station application |
| target_window | Target window name for this page (empty for default) |
Creates a new application page instance associated with the specified player station application. The optional target_window parameter allows specifying which window should display this page.
|
overridevirtual |
Destructor.
Cleans up resources used by the application page.
|
overridevirtual |
Updates the page state.
| dt | Time elapsed since the last update in seconds |
Called once per frame to update the page state. This method can be used to handle animations, timers, or other time-dependent functionality.
Implements makVre::DtVreHeaderFooterUIBase.
|
overridevirtual |
Initializes the main QML content.
Sets up the main QML content for the page, including connecting signals and slots between C++ and QML. This is called during page initialization after the QML has been loaded.
Implements makVre::DtVreHeaderFooterUIBase.
|
overridevirtual |
Sets the visibility of the page.
| visible | True to show the page, false to hide it |
Overrides the base class implementation to update page information when the page becomes visible. This ensures that the displayed information is current whenever the page is shown.
Reimplemented from makVre::DtVreHeaderFooterUIBase.
|
virtual |
Sets the enabled state of the Choose Role button.
| enable | True to enable the button, false to disable it |
Controls whether the Choose Role button is interactive. The button is typically disabled in lockdown mode or when there is no network connection.
|
virtual |
Sets the enabled state of the Return button.
| enable | True to enable the button, false to disable it |
Controls whether the Return button is interactive. The button is typically disabled when the user is not engaged with a role.
|
virtual |
Sets the enabled state of the Choose Session button and dialog.
| enableBtn | True to enable the button, false to disable it |
| enableDialog | True to show a confirmation dialog, false for direct action |
Controls whether the Choose Session button is interactive and whether it should show a confirmation dialog when clicked. The dialog is typically enabled when the user is already in a session.
|
virtual |
Updates the displayed terrain information.
| terrain | Name of the current terrain |
Sets the terrain name displayed in the UI. This shows the currently loaded terrain database used by the simulation.
|
virtual |
Updates the displayed scenario information.
| scenario | Name of the current scenario |
Sets the scenario name displayed in the UI. This shows the currently loaded scenario file used by the simulation.
|
virtual |
Updates the displayed session type information.
| type | Type of the current session |
Sets the session type displayed in the UI (e.g., "Unhosted", "Self-hosted", or "Externally Hosted").
|
virtual |
Refreshes all menu information.
Updates all displayed information in the UI, including entity details, role information, scenario data, and session state. Called when the page becomes visible or when information changes.
|
virtualslot |
Slot called when the Return button is clicked.
Handles the Return button click event. This sends a UIBackButtonClickedMessage to the message system to request returning to the previous screen.
|
virtualslot |
Slot called when the Choose Role button is clicked.
Handles the Choose Role button click event. This sends a UIChooseRoleButtonClickedMessage to the message system to request displaying the Choose Role interface.
|
virtualslot |
Slot called when the Choose Session button is clicked.
Handles the Choose Session button click event. This displays the Choose Session dialog to allow selecting a different simulation session.
|
virtualslot |
Slot called when the Choose Session dialog is opened.
Handles the Choose Session dialog open event. This is used to set up the dialog and connect signals for its interactions.
|
virtualslot |
Slot called when the Choose Session dialog is closed.
Handles the Choose Session dialog close event. This is used to clean up any temporary resources and disconnect signals.
|
virtualslot |
Slot called when the Choose Session dialog is accepted.
Handles the Choose Session dialog accept event (e.g., OK button clicked). This closes the dialog and sends a UIChooseSessionButtonClickedMessage to the message system to request changing to the selected session.
|
virtualslot |
Slot called when the Choose Session dialog is rejected.
Handles the Choose Session dialog reject event (e.g., Cancel button clicked). This closes the dialog without making any changes to the session.
|
virtualslot |
Slot called when the Exit dialog is opened.
Handles the Exit dialog open event. This checks application settings to determine whether to show the dialog or exit immediately, and connects signals for dialog interactions.
|
virtualslot |
Slot called when the Exit dialog is accepted.
Handles the Exit dialog accept event (e.g., OK button clicked). This updates application settings and exits the application.
|
virtualslot |
Slot called when the Exit dialog is rejected.
Handles the Exit dialog reject event (e.g., Cancel button clicked). This closes the dialog without exiting the application.
|
virtualslot |
Slot called when the Exit dialog is closed.
Handles the Exit dialog close event. This is used to clean up any temporary resources and disconnect signals.
|
overrideprotectedvirtual |
Updates the UI when the running state changes.
| runState | New running state of the simulation |
Overrides the base class implementation to update the status panel when the simulation running state changes. This ensures that the UI reflects the current state of the simulation (running or paused).
Reimplemented from makVre::DtVreHeaderFooterUIBase.