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

Detailed Description

DtPlayerStationPersistentNotification provides a UI component for displaying persistent notifications to the user during gameplay. It typically shows important state information, such as whether the simulation is running or paused, and can be positioned in the header or footer area of the application window.

#include <playerStationPersistentNotification.h>

Inheritance diagram for makVre::DtPlayerStationPersistentNotification:
[legend]

Public Slots

virtual void runningStateUpdated (bool runState) override
 

Public Member Functions

 DtPlayerStationPersistentNotification (DtPlayerStationApp &app, const std::string &target_window="")
 
virtual ~DtPlayerStationPersistentNotification () override
 
virtual void initMain () override
 
virtual void tick (double dt) override
 
virtual void setVisibility (bool visible) override
 

Protected Member Functions

virtual void setRunning (bool running)
 

Protected Attributes

bool myIsPlaying
 

Constructor & Destructor Documentation

◆ DtPlayerStationPersistentNotification()

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

Constructor.

Parameters
appReference to the player station application
target_windowName of the target window to display in (empty for default)

Creates a new persistent notification component associated with the specified player station application and target window.

◆ ~DtPlayerStationPersistentNotification()

virtual makVre::DtPlayerStationPersistentNotification::~DtPlayerStationPersistentNotification ( )
overridevirtual

Virtual destructor.

Ensures proper cleanup of notification resources.

Member Function Documentation

◆ initMain()

virtual void makVre::DtPlayerStationPersistentNotification::initMain ( )
overridevirtual

Initializes the main notification UI.

Sets up the QML components and connects signals and slots for the notification system. This should be called after construction but before the notification is used.

Implements makVre::DtVreHeaderFooterUIBase.

◆ tick()

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

Updates the notification each frame.

Parameters
dtTime in seconds since the last update

Handles per-frame updates for the notification, such as checking for state changes that should be displayed.

Implements makVre::DtVreHeaderFooterUIBase.

◆ setVisibility()

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

Sets the visibility of the notification.

Parameters
visibleTrue to show the notification, false to hide it

Controls whether the notification is visible to the user. This overrides the base class implementation to provide notification-specific visibility behavior.

Reimplemented from makVre::DtVreHeaderFooterUIBase.

◆ runningStateUpdated

virtual void makVre::DtPlayerStationPersistentNotification::runningStateUpdated ( bool runState)
overridevirtualslot

Checks if the notification is visible.

Returns
True if the notification is visible, false otherwise

Currently commented out implementation of isVisible() override.

Handles updates to the simulation running state

Parameters
runStateTrue if the simulation is running, false if paused

Slot called from QML when the running state changes, allowing the notification to update its display accordingly.

◆ setRunning()

virtual void makVre::DtPlayerStationPersistentNotification::setRunning ( bool running)
protectedvirtual

Sets the running state for the notification.

Parameters
runningTrue if the simulation is running, false if paused

Updates the internal running state and triggers UI updates to reflect the new state in the notification display.

Member Data Documentation

◆ myIsPlaying

bool makVre::DtPlayerStationPersistentNotification::myIsPlaying
protected

Flag indicating whether the simulation is currently playing.

Tracks whether the simulation is in a running (true) or paused (false) state. This affects how the notification is displayed to the user.


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