DtPlayerStationTempNotification provides a UI component for displaying temporary notifications to the user. These notifications appear on screen for a specified duration before automatically disappearing. This is useful for providing feedback about events or state changes that don't require persistent notification.
#include <playerStationTempNotification.h>
◆ DtPlayerStationTempNotification()
| makVre::DtPlayerStationTempNotification::DtPlayerStationTempNotification |
( |
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 temporary notification component associated with the specified player station application and target window.
◆ ~DtPlayerStationTempNotification()
| virtual makVre::DtPlayerStationTempNotification::~DtPlayerStationTempNotification |
( |
| ) |
|
|
overridevirtual |
Virtual destructor.
Ensures proper cleanup of notification resources.
◆ newNotification()
| virtual void makVre::DtPlayerStationTempNotification::newNotification |
( |
const QString & | text, |
|
|
double | lifetime = 3.0 ) |
|
virtual |
Displays a new temporary notification.
- Parameters
-
| text | Content of the notification to display |
| lifetime | Duration in seconds that the notification should remain visible |
Creates and displays a temporary notification with the specified text that will automatically disappear after the specified lifetime (default 3 seconds). If a notification is already visible, it will be replaced by this new one.
◆ init()
| virtual void makVre::DtPlayerStationTempNotification::init |
( |
| ) |
|
|
virtual |
Initializes the notification system.
Ensures that the notification system is properly initialized before use. This sets up the QML components and prepares the system for displaying notifications. Called automatically when needed but can be called explicitly to prepare the system in advance.
◆ setText()
| virtual void makVre::DtPlayerStationTempNotification::setText |
( |
const QString & | str | ) |
|
|
protectedvirtual |
Sets the text content of the notification.
- Parameters
-
| str | Text string to display in the notification |
Updates the text content of the notification. This is typically called internally by newNotification().
◆ setLifetime()
| virtual void makVre::DtPlayerStationTempNotification::setLifetime |
( |
double | time | ) |
|
|
protectedvirtual |
Sets the lifetime of the notification.
- Parameters
-
| time | Duration in seconds that the notification should remain visible |
Sets how long the notification will remain visible before automatically disappearing. This is typically called internally by newNotification().
◆ close()
| virtual void makVre::DtPlayerStationTempNotification::close |
( |
| ) |
|
|
protectedvirtual |
Closes the notification.
Hides the notification UI element, typically called when the notification lifetime expires or when a new notification replaces it.
◆ open()
| virtual void makVre::DtPlayerStationTempNotification::open |
( |
| ) |
|
|
protectedvirtual |
Opens the notification.
Shows the notification UI element with the current text content. This is typically called after setting the text and lifetime.
◆ myText
| QString makVre::DtPlayerStationTempNotification::myText |
|
protected |
Current text content of the notification.
◆ myLifetime
| double makVre::DtPlayerStationTempNotification::myLifetime |
|
protected |
Current lifetime of the notification in seconds.
◆ myApp
Reference to the player station application.
◆ myTargetWindow
| std::string makVre::DtPlayerStationTempNotification::myTargetWindow |
|
protected |
Target window name for displaying the notification.
◆ myRoot
| QQuickItem* makVre::DtPlayerStationTempNotification::myRoot |
|
protected |
Pointer to the root QML item for the notification UI.
The documentation for this class was generated from the following file: