|
game_launcher 1.1.0
Modern Linux game launcher with Steam / Proton / Wine integration
|
#include <notification_service.h>
Static Public Member Functions | |
| static void | error (const std::string &message, float duration=5.0f) |
| static void | info (const std::string &message, float duration=3.0f) |
| Convenience methods that safely handle null instance. | |
| static std::shared_ptr< INotificationService > | instance () |
| Get the current notification service instance. | |
| static void | setInstance (std::shared_ptr< INotificationService > service) |
| Set the notification service implementation UI layer calls this at startup with its implementation. | |
| static void | success (const std::string &message, float duration=3.0f) |
| static void | warning (const std::string &message, float duration=5.0f) |
Definition at line 77 of file notification_service.h.
|
static |
Definition at line 90 of file notification_service.cpp.
|
static |
Convenience methods that safely handle null instance.
Definition at line 66 of file notification_service.cpp.
|
static |
Get the current notification service instance.
Returns an empty shared_ptr if not set.
Lifetime contract: returns a shared_ptr (not a raw pointer) because at QApplication teardown a background thread may still fire while main()'s scope releases the last reference. Holding a shared_ptr for the duration of the call keeps the underlying service alive past any racing setInstance(nullptr).
Definition at line 49 of file notification_service.cpp.
Referenced by main().
|
static |
Set the notification service implementation UI layer calls this at startup with its implementation.
Definition at line 60 of file notification_service.cpp.
Referenced by main().
|
static |
Definition at line 74 of file notification_service.cpp.
|
static |
Definition at line 82 of file notification_service.cpp.