VR-Engage  2.2
Loading...
Searching...
No Matches
makVre::DtVreHeaderFooterUIBase Class Referenceabstract

Detailed Description

DtVreHeaderFooterUIBase provides a foundation for UI components that use a standard header and footer layout. It manages the visibility, initialization, and event handling for these UI elements, as well as common dialogs like settings and exit confirmation. This class simplifies the creation of consistent UI components throughout the application.

#include <vreHeaderFooterUIBase.h>

Inheritance diagram for makVre::DtVreHeaderFooterUIBase:
[legend]

Public Slots

virtual void slot_settingsOpened ()
 
virtual void slot_settingsClosed ()
 
virtual void slot_displayEngineConfigClicked ()
 
virtual void slot_weatherAndEnvClicked ()
 
virtual void slot_advancedVisualSettingsClicked ()
 
virtual void slot_aboutClicked ()
 
virtual void slot_soundVolumeChanged (qreal volume)
 
virtual void slot_soundEnabledChanged (bool enabled)
 
virtual void slot_exitOpened ()
 
virtual void slot_exitClosed ()
 
virtual void slot_exitAccepted ()
 
virtual void slot_exitRejected ()
 
virtual void slot_playClicked ()
 
virtual void slot_pauseClicked ()
 
virtual void slot_rewindClicked ()
 
virtual void slot_connectionClicked ()
 
virtual void slot_helpOpened ()
 
virtual void slot_helpClosed ()
 
virtual void slot_backClicked ()
 

Public Member Functions

 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 void initMain ()=0
 
virtual void tick (double dt)=0
 
virtual void setVisibility (bool visible)
 
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)
 
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)
 

Protected Attributes

DtPlayerStationAppmyApp
 
QQuickItem * myRoot
 
std::string myTargetWindow
 
std::string myTargetFile
 
std::string myHeaderId
 
std::string myFooterId
 
std::string myMainContentId
 

Constructor & Destructor Documentation

◆ DtVreHeaderFooterUIBase() [1/2]

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

Simple constructor.

Parameters
appReference to the player station application
filePath to the QML file defining the UI
target_windowName of the window to display in (empty for default)

Creates a new UI component using the specified QML file for the given window. Uses default IDs for header, footer, and main content elements.

◆ DtVreHeaderFooterUIBase() [2/2]

makVre::DtVreHeaderFooterUIBase::DtVreHeaderFooterUIBase ( DtPlayerStationApp & app,
const std::string & file,
const std::string & headerId,
const std::string & footerId,
const std::string & mainContentId,
const std::string & target_window )

Detailed constructor.

Parameters
appReference to the player station application
filePath to the QML file defining the UI
headerIdID of the header element in the QML
footerIdID of the footer element in the QML
mainContentIdID of the main content element in the QML
target_windowName of the window to display in

Creates a new UI component using the specified QML file with custom IDs for the header, footer, and main content elements. This allows for more fine-grained control over UI structure and appearance.

◆ ~DtVreHeaderFooterUIBase()

virtual makVre::DtVreHeaderFooterUIBase::~DtVreHeaderFooterUIBase ( )
overridevirtual

Virtual destructor.

Ensures proper cleanup of UI component resources.

Member Function Documentation

◆ initMain()

virtual void makVre::DtVreHeaderFooterUIBase::initMain ( )
pure virtual

Core functionality methods.

Initializes the main UI component

Pure virtual method that must be implemented by derived classes to initialize the UI component. This typically involves setting up signals/slots connections, initial state, and other component-specific initialization.

Implemented in makVre::DtPlayerStationPersistentNotification, makVre::DtVreAppPage, makVre::DtVreChooseRolePage, makVre::DtVreLoadingPage, makVre::DtVreSelectConnectionPage, makVre::DtVreStartPage, and makVre::DtVreWaitingPage.

◆ tick()

virtual void makVre::DtVreHeaderFooterUIBase::tick ( double dt)
pure virtual

Updates the UI component each frame.

Parameters
dtTime in seconds since the last update

Pure virtual method that must be implemented by derived classes to handle per-frame updates for the UI component. This is called once per frame and allows for animations, state updates, and other time-based operations.

Implemented in makVre::DtPlayerStationPersistentNotification, makVre::DtVreAppPage, makVre::DtVreChooseRolePage, makVre::DtVreLoadingPage, makVre::DtVreSelectConnectionPage, makVre::DtVreStartPage, and makVre::DtVreWaitingPage.

◆ setVisibility()

virtual void makVre::DtVreHeaderFooterUIBase::setVisibility ( bool visible)
virtual

Visibility control methods.

Sets the visibility of the entire UI component

Parameters
visibleTrue to show the component, false to hide it

Controls the visibility of the root object of this UI component. This affects the entire component, not individual elements within it.

Reimplemented in makVre::DtPlayerStationPersistentNotification, makVre::DtVreAppPage, makVre::DtVreChooseRolePage, makVre::DtVreLoadingPage, makVre::DtVreSelectConnectionPage, makVre::DtVreStartPage, and makVre::DtVreWaitingPage.

◆ isVisible()

virtual bool makVre::DtVreHeaderFooterUIBase::isVisible ( )
virtual

Checks if the UI component is visible.

Returns
True if the component is visible, false otherwise

Determines whether the UI component is currently visible to the user.

◆ close()

virtual void makVre::DtVreHeaderFooterUIBase::close ( )
virtual

Closes the UI component.

Convenience method that hides the UI component by calling setVisibility(false).

◆ open()

virtual void makVre::DtVreHeaderFooterUIBase::open ( )
virtual

Opens the UI component.

Convenience method that shows the UI component by calling setVisibility(true).

Referenced by updateModalState().

◆ initHeader()

virtual void makVre::DtVreHeaderFooterUIBase::initHeader ( )
virtual

Header control methods.

Initializes the header portion of the UI

Sets up the header elements and their initial state. This is typically called during component initialization.

◆ isHeaderVisible()

virtual bool makVre::DtVreHeaderFooterUIBase::isHeaderVisible ( )
virtual

Checks if the header is visible.

Returns
True if the header is visible, false otherwise

Determines whether the header portion of the UI is currently visible.

◆ setHeaderVisiblility()

virtual void makVre::DtVreHeaderFooterUIBase::setHeaderVisiblility ( bool visible)
virtual

Sets the visibility of the header.

Parameters
visibleTrue to show the header, false to hide it

Controls the visibility of the header portion of the UI.

◆ setMenuTitle()

virtual void makVre::DtVreHeaderFooterUIBase::setMenuTitle ( const QString & title)
virtual

Sets the title displayed in the header.

Parameters
titleText to display as the menu title

Updates the title text shown in the header area of the UI.

◆ setShowCutoutVisible()

virtual void makVre::DtVreHeaderFooterUIBase::setShowCutoutVisible ( bool visible)
virtual

Sets the visibility of the cutout area in the header.

Parameters
visibleTrue to show the cutout area, false to hide it

Controls the visibility of the cutout area in the header, which typically contains action buttons or status information.

◆ setButtonEnabled()

virtual void makVre::DtVreHeaderFooterUIBase::setButtonEnabled ( const std::string & id,
bool enabled )
virtual

Enables or disables a specific button in the header.

Parameters
idIdentifier of the button to modify
enabledTrue to enable the button, false to disable it

Controls whether a specific button in the header is enabled or disabled. Disabled buttons are typically grayed out and do not respond to clicks.

◆ isButtonEnabled()

virtual bool makVre::DtVreHeaderFooterUIBase::isButtonEnabled ( const std::string & id)
virtual

Checks if a specific button is enabled.

Parameters
idIdentifier of the button to check
Returns
True if the button is enabled, false if disabled

Determines whether a specific button in the header is currently enabled.

◆ setAllCutoutControlsEnabled()

virtual void makVre::DtVreHeaderFooterUIBase::setAllCutoutControlsEnabled ( bool enabled)
virtual

Enables or disables all cutout controls.

Parameters
enabledTrue to enable all controls, false to disable them

Controls whether all buttons and controls in the cutout area are enabled or disabled.

◆ setShowTopRightControlsVisible()

virtual void makVre::DtVreHeaderFooterUIBase::setShowTopRightControlsVisible ( bool visible)
virtual

Sets the visibility of top-right controls.

Parameters
visibleTrue to show the controls, false to hide them

Controls the visibility of controls located in the top-right area of the header.

◆ initFooter()

virtual void makVre::DtVreHeaderFooterUIBase::initFooter ( )
virtual

Footer control methods.

Initializes the footer portion of the UI

Sets up the footer elements and their initial state. This is typically called during component initialization.

Reimplemented in makVre::DtVreSelectConnectionPage.

◆ isFooterVisible()

virtual bool makVre::DtVreHeaderFooterUIBase::isFooterVisible ( )
virtual

Checks if the footer is visible.

Returns
True if the footer is visible, false otherwise

Determines whether the footer portion of the UI is currently visible.

◆ setFooterVisiblility()

virtual void makVre::DtVreHeaderFooterUIBase::setFooterVisiblility ( bool visible)
virtual

Sets the visibility of the footer.

Parameters
visibleTrue to show the footer, false to hide it

Controls the visibility of the footer portion of the UI.

◆ setShowBottomBackButtonVisible()

virtual void makVre::DtVreHeaderFooterUIBase::setShowBottomBackButtonVisible ( bool visible)
virtual

Sets the visibility of the back button in the footer.

Parameters
visibleTrue to show the back button, false to hide it

Controls the visibility of the back button located in the footer area.

◆ isMainContentVisible()

virtual bool makVre::DtVreHeaderFooterUIBase::isMainContentVisible ( )
virtual

Main content control methods.

Checks if the main content is visible

Returns
True if the main content is visible, false otherwise

Determines whether the main content area of the UI is currently visible.

◆ setMainContentVisibility()

virtual void makVre::DtVreHeaderFooterUIBase::setMainContentVisibility ( bool visible)
virtual

Sets the visibility of the main content.

Parameters
visibleTrue to show the main content, false to hide it

Controls the visibility of the main content area of the UI.

◆ registerMessageHandlers()

virtual void makVre::DtVreHeaderFooterUIBase::registerMessageHandlers ( )
virtual

Message handling methods.

Registers message handlers for this UI component

Sets up handlers for messages that this UI component needs to process. This is typically called during initialization or when the component becomes active.

◆ deregisterMessageHandlers()

virtual void makVre::DtVreHeaderFooterUIBase::deregisterMessageHandlers ( )
virtual

Deregisters message handlers for this UI component.

Removes handlers for messages that this UI component was processing. This is typically called during cleanup or when the component becomes inactive.

◆ handleBackButtonClicked()

DtVreMessageResult makVre::DtVreHeaderFooterUIBase::handleBackButtonClicked ( DtVreMessage * msg)

Handles back button click messages.

Parameters
msgPointer to the button click message
Returns
Message handling result

Processes messages generated when the back button is clicked. This typically navigates back to a previous screen or state.

◆ handleEscapeMessage()

DtVreMessageResult makVre::DtVreHeaderFooterUIBase::handleEscapeMessage ( DtVreMessage * msg)

Handles escape key press messages.

Parameters
msgPointer to the key press message
Returns
Message handling result

Processes messages generated when the escape key is pressed. This typically closes dialogs or navigates back.

◆ root()

QQuickItem * makVre::DtVreHeaderFooterUIBase::root ( )

Gets the root UI element.

Returns
Pointer to the root QQuickItem

Provides access to the root QQuickItem of this UI component. This can be used to directly manipulate the UI element tree if needed.

◆ slot_settingsOpened

virtual void makVre::DtVreHeaderFooterUIBase::slot_settingsOpened ( )
virtualslot

Settings dialog slots.

Called when the settings dialog is opened

Handles the opening of the settings dialog, performing any necessary initialization for the settings UI.

◆ slot_settingsClosed

virtual void makVre::DtVreHeaderFooterUIBase::slot_settingsClosed ( )
virtualslot

Called when the settings dialog is closed.

Handles the closing of the settings dialog, performing any necessary cleanup or state updates.

◆ slot_displayEngineConfigClicked

virtual void makVre::DtVreHeaderFooterUIBase::slot_displayEngineConfigClicked ( )
virtualslot

Called when display engine configuration is clicked.

Handles navigation to the display engine configuration settings page.

◆ slot_weatherAndEnvClicked

virtual void makVre::DtVreHeaderFooterUIBase::slot_weatherAndEnvClicked ( )
virtualslot

Called when weather and environment settings are clicked.

Handles navigation to the weather and environment settings page.

◆ slot_advancedVisualSettingsClicked

virtual void makVre::DtVreHeaderFooterUIBase::slot_advancedVisualSettingsClicked ( )
virtualslot

Called when advanced visual settings are clicked.

Handles navigation to the advanced visual settings page.

◆ slot_aboutClicked

virtual void makVre::DtVreHeaderFooterUIBase::slot_aboutClicked ( )
virtualslot

Called when the about option is clicked.

Handles navigation to the about dialog or page.

◆ slot_soundVolumeChanged

virtual void makVre::DtVreHeaderFooterUIBase::slot_soundVolumeChanged ( qreal volume)
virtualslot

Called when the sound volume is changed.

Parameters
volumeNew volume level (typically 0.0 to 1.0)

Handles changes to the sound volume setting.

◆ slot_soundEnabledChanged

virtual void makVre::DtVreHeaderFooterUIBase::slot_soundEnabledChanged ( bool enabled)
virtualslot

Called when sound enabled state is changed.

Parameters
enabledTrue if sound is enabled, false otherwise

Handles changes to the sound enabled/disabled setting.

◆ slot_exitOpened

virtual void makVre::DtVreHeaderFooterUIBase::slot_exitOpened ( )
virtualslot

Exit confirmation dialog slots.

Called when the exit confirmation dialog is opened

Handles the opening of the exit confirmation dialog, preparing the UI and any state needed for the confirmation process.

◆ slot_exitClosed

virtual void makVre::DtVreHeaderFooterUIBase::slot_exitClosed ( )
virtualslot

Called when the exit confirmation dialog is closed.

Handles the closing of the exit confirmation dialog, performing any necessary cleanup regardless of the user's choice.

◆ slot_exitAccepted

virtual void makVre::DtVreHeaderFooterUIBase::slot_exitAccepted ( )
virtualslot

Called when exit is confirmed (Yes/OK clicked)

Handles the user confirming the exit action, typically by initiating the actual exit process.

◆ slot_exitRejected

virtual void makVre::DtVreHeaderFooterUIBase::slot_exitRejected ( )
virtualslot

Called when exit is rejected (No/Cancel clicked)

Handles the user rejecting the exit action, typically by returning to the previous state.

◆ slot_playClicked

virtual void makVre::DtVreHeaderFooterUIBase::slot_playClicked ( )
virtualslot

Playback control slots.

Called when the play button is clicked

Handles requests to start or resume playback of the simulation.

◆ slot_pauseClicked

virtual void makVre::DtVreHeaderFooterUIBase::slot_pauseClicked ( )
virtualslot

Called when the pause button is clicked.

Handles requests to pause the simulation.

◆ slot_rewindClicked

virtual void makVre::DtVreHeaderFooterUIBase::slot_rewindClicked ( )
virtualslot

Called when the rewind button is clicked.

Handles requests to rewind or reset the simulation to a starting point.

◆ slot_connectionClicked

virtual void makVre::DtVreHeaderFooterUIBase::slot_connectionClicked ( )
virtualslot

Connection control slots.

Called when the connection button is clicked

Handles requests to manage connection settings or status.

Reimplemented in makVre::DtVreSelectConnectionPage.

◆ slot_helpOpened

virtual void makVre::DtVreHeaderFooterUIBase::slot_helpOpened ( )
virtualslot

Help system slots.

Called when the help system is opened

Handles the opening of the help dialog or overlay.

◆ slot_helpClosed

virtual void makVre::DtVreHeaderFooterUIBase::slot_helpClosed ( )
virtualslot

Called when the help system is closed.

Handles the closing of the help dialog or overlay.

◆ slot_backClicked

virtual void makVre::DtVreHeaderFooterUIBase::slot_backClicked ( )
virtualslot

Navigation control slots.

Called when the back button is clicked

Handles navigation requests to go back to a previous screen or state.

◆ runningStateUpdated()

virtual void makVre::DtVreHeaderFooterUIBase::runningStateUpdated ( bool runState)
inlineprotectedvirtual

Updates the running state.

Parameters
runStateTrue if the simulation is running, false if paused

Updates the UI to reflect the current running state of the simulation. This base implementation does nothing and should be overridden by derived classes.

Reimplemented in makVre::DtVreAppPage.

◆ closeAllSettingsPages()

virtual void makVre::DtVreHeaderFooterUIBase::closeAllSettingsPages ( std::string pageName = "")
protectedvirtual

Closes settings pages.

Parameters
pageNameName of the page to keep open (empty to close all)

Closes all settings pages, optionally keeping one specified page open. If no page name is passed, all pages are closed. If a page name is provided, every page except the specified one is closed.

◆ appModeUpdated()

virtual void makVre::DtVreHeaderFooterUIBase::appModeUpdated ( const std::string & newAppMode,
const std::string & oldAppMode )
protectedvirtual

Handles application mode updates.

Parameters
newAppModeIdentifier of the new application mode
oldAppModeIdentifier of the previous application mode

Called when the application mode changes, allowing the UI to update its state appropriately for the new mode.

Reimplemented in makVre::DtVreChooseRolePage, makVre::DtVreSelectConnectionPage, and makVre::DtVreStartPage.

◆ updateModalState()

virtual void makVre::DtVreHeaderFooterUIBase::updateModalState ( bool open)
protectedvirtual

Updates the modal dialog state.

Parameters
openTrue if a modal dialog is open, false otherwise

Notifies the system about the presence of a modal dialog or popup. This allows other components to adjust their behavior appropriately when modal dialogs are active.

References open().

◆ handleApplicationMode()

DtVreMessageResult makVre::DtVreHeaderFooterUIBase::handleApplicationMode ( DtVreMessage * msg)
protected

Internal message handlers.

Handles application mode change messages

Parameters
msgPointer to the application mode message
Returns
Message handling result

Processes messages about changes to the application mode.

◆ handleSessionPlayState()

DtVreMessageResult makVre::DtVreHeaderFooterUIBase::handleSessionPlayState ( DtVreMessage * msg)
protected

Handles session play state messages.

Parameters
msgPointer to the play state message
Returns
Message handling result

Processes messages about changes to the session play state (playing, paused, etc.).

◆ handleToggleHelp()

DtVreMessageResult makVre::DtVreHeaderFooterUIBase::handleToggleHelp ( DtVreMessage * msg)
protected

Handles help toggle messages.

Parameters
msgPointer to the help toggle message
Returns
Message handling result

Processes messages requesting to show or hide the help system.

Member Data Documentation

◆ myApp

DtPlayerStationApp& makVre::DtVreHeaderFooterUIBase::myApp
protected

Reference to the player station application.

Provides access to application services and state.

◆ myRoot

QQuickItem* makVre::DtVreHeaderFooterUIBase::myRoot
protected

Pointer to the root QML item.

Reference to the root UI element for this component.

◆ myTargetWindow

std::string makVre::DtVreHeaderFooterUIBase::myTargetWindow
protected

Name of the target window.

Identifies which window the UI should be displayed in.

◆ myTargetFile

std::string makVre::DtVreHeaderFooterUIBase::myTargetFile
protected

Path to the QML file.

Specifies the QML file that defines this UI component.

◆ myHeaderId

std::string makVre::DtVreHeaderFooterUIBase::myHeaderId
protected

ID of the header element.

Identifies the header element in the QML structure.

◆ myFooterId

std::string makVre::DtVreHeaderFooterUIBase::myFooterId
protected

ID of the footer element.

Identifies the footer element in the QML structure.

◆ myMainContentId

std::string makVre::DtVreHeaderFooterUIBase::myMainContentId
protected

ID of the main content element.

Identifies the main content element in the QML structure.


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