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>
◆ DtPlayerStationPersistentNotification()
| makVre::DtPlayerStationPersistentNotification::DtPlayerStationPersistentNotification |
( |
DtPlayerStationApp & | app, |
|
|
const std::string & | target_window = "" ) |
Constructor.
- Parameters
-
| app | Reference to the player station application |
| target_window | Name 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.
◆ 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
-
| dt | Time 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
-
| visible | True 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
-
| runState | True 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
-
| running | True 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.
◆ 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: