VR-Engage  2.2
Loading...
Searching...
No Matches
makVre::DtVreAppPage Class Reference

Detailed Description

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>

Inheritance diagram for makVre::DtVreAppPage:
[legend]

Public Slots

virtual void slot_returnClicked ()
 
virtual void slot_chooseRoleClicked ()
 
virtual void slot_chooseSessionClicked ()
 
virtual void slot_chooseSessionOpened ()
 
virtual void slot_chooseSessionClosed ()
 
virtual void slot_chooseSessionAccepted ()
 
virtual void slot_chooseSessionRejected ()
 
virtual void slot_appMenuExitOpened ()
 
virtual void slot_appMenuExitAccepted ()
 
virtual void slot_appMenuExitRejected ()
 
virtual void slot_appMenuExitClosed ()
 

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 ()
 

Protected Member Functions

virtual void runningStateUpdated (bool runState) override
 

Additional Inherited Members

Constructor & Destructor Documentation

◆ DtVreAppPage()

makVre::DtVreAppPage::DtVreAppPage ( DtPlayerStationApp & app,
const std::string & target_window = "" )

Constructor.

Parameters
appReference to the player station application
target_windowTarget 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.

◆ ~DtVreAppPage()

virtual makVre::DtVreAppPage::~DtVreAppPage ( )
overridevirtual

Destructor.

Cleans up resources used by the application page.

Member Function Documentation

◆ tick()

virtual void makVre::DtVreAppPage::tick ( double dt)
overridevirtual

Updates the page state.

Parameters
dtTime 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.

◆ initMain()

virtual void makVre::DtVreAppPage::initMain ( )
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.

◆ setVisibility()

virtual void makVre::DtVreAppPage::setVisibility ( bool visible)
overridevirtual

Sets the visibility of the page.

Parameters
visibleTrue 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.

◆ setChooseRoleBtnState()

virtual void makVre::DtVreAppPage::setChooseRoleBtnState ( bool enable)
virtual

Sets the enabled state of the Choose Role button.

Parameters
enableTrue 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.

◆ setReturnBtnState()

virtual void makVre::DtVreAppPage::setReturnBtnState ( bool enable)
virtual

Sets the enabled state of the Return button.

Parameters
enableTrue 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.

◆ setChooseSessionBtnState()

virtual void makVre::DtVreAppPage::setChooseSessionBtnState ( bool enableBtn,
bool enableDialog )
virtual

Sets the enabled state of the Choose Session button and dialog.

Parameters
enableBtnTrue to enable the button, false to disable it
enableDialogTrue 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.

◆ setTerrain()

virtual void makVre::DtVreAppPage::setTerrain ( const std::string & terrain)
virtual

Updates the displayed terrain information.

Parameters
terrainName of the current terrain

Sets the terrain name displayed in the UI. This shows the currently loaded terrain database used by the simulation.

◆ setScenario()

virtual void makVre::DtVreAppPage::setScenario ( const std::string & scenario)
virtual

Updates the displayed scenario information.

Parameters
scenarioName of the current scenario

Sets the scenario name displayed in the UI. This shows the currently loaded scenario file used by the simulation.

◆ setSessionType()

virtual void makVre::DtVreAppPage::setSessionType ( const QString & type)
virtual

Updates the displayed session type information.

Parameters
typeType of the current session

Sets the session type displayed in the UI (e.g., "Unhosted", "Self-hosted", or "Externally Hosted").

◆ refreshMenus()

virtual void makVre::DtVreAppPage::refreshMenus ( )
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.

◆ slot_returnClicked

virtual void makVre::DtVreAppPage::slot_returnClicked ( )
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.

◆ slot_chooseRoleClicked

virtual void makVre::DtVreAppPage::slot_chooseRoleClicked ( )
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.

◆ slot_chooseSessionClicked

virtual void makVre::DtVreAppPage::slot_chooseSessionClicked ( )
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.

◆ slot_chooseSessionOpened

virtual void makVre::DtVreAppPage::slot_chooseSessionOpened ( )
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.

◆ slot_chooseSessionClosed

virtual void makVre::DtVreAppPage::slot_chooseSessionClosed ( )
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.

◆ slot_chooseSessionAccepted

virtual void makVre::DtVreAppPage::slot_chooseSessionAccepted ( )
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.

◆ slot_chooseSessionRejected

virtual void makVre::DtVreAppPage::slot_chooseSessionRejected ( )
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.

◆ slot_appMenuExitOpened

virtual void makVre::DtVreAppPage::slot_appMenuExitOpened ( )
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.

◆ slot_appMenuExitAccepted

virtual void makVre::DtVreAppPage::slot_appMenuExitAccepted ( )
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.

◆ slot_appMenuExitRejected

virtual void makVre::DtVreAppPage::slot_appMenuExitRejected ( )
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.

◆ slot_appMenuExitClosed

virtual void makVre::DtVreAppPage::slot_appMenuExitClosed ( )
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.

◆ runningStateUpdated()

virtual void makVre::DtVreAppPage::runningStateUpdated ( bool runState)
overrideprotectedvirtual

Updates the UI when the running state changes.

Parameters
runStateNew 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.


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