|
RADLib
RADical C++ application framework
|
Notification collection model. More...
#include <RADAppKit.h>
Inheritance diagram for RADUi::NotificationModel:
Collaboration diagram for RADUi::NotificationModel:Public Member Functions | |
| uint64_t | push (Notification notification) |
| Adds a notification and returns assigned id. More... | |
| bool | dismiss (uint64_t id) |
| Removes a notification by id. More... | |
| void | clear () |
| Clears all notifications. More... | |
| const std::vector< Notification > & | notifications () const |
| Returns notifications. More... | |
| bool | triggerAction (uint64_t id) |
| Triggers notification action. More... | |
Public Member Functions inherited from RADCore::RADObject | |
| RADObject () | |
| Creates a RADObject bound to the current thread. More... | |
| virtual | ~RADObject () |
| Disconnects tracked event links and releases lifetime token. More... | |
| void | registerLink (const ConnectionRecord &record) |
| Registers a connection for cleanup when this object is destroyed. More... | |
| std::thread::id | threadId () const |
| Returns the thread id this object is currently associated with. More... | |
| EventLoop * | associatedEventLoop () const |
| Returns the associated event loop, if any. More... | |
| ThreadAffinity | threadAffinity () const |
| Returns both thread id and associated loop atomically. More... | |
| std::weak_ptr< void > | lifetimeToken () const |
| Returns a weak token used to drop queued callbacks after destruction. More... | |
| void | moveToThread (std::thread::id tId, EventLoop *loop=nullptr) |
| Moves the object's affinity to tId and optional loop. More... | |
Public Attributes | |
| RADCore::Event< void() > | changed |
| Raised when notifications change. More... | |
| RADCore::Event< void(uint64_t, std::string) > | actionTriggered |
| Raised when a notification action is triggered. More... | |
Notification collection model.
| void RADUi::NotificationModel::clear | ( | ) |
Clears all notifications.
| bool RADUi::NotificationModel::dismiss | ( | uint64_t | id | ) |
Removes a notification by id.
| const std::vector<Notification>& RADUi::NotificationModel::notifications | ( | ) | const |
Returns notifications.
| uint64_t RADUi::NotificationModel::push | ( | Notification | notification | ) |
Adds a notification and returns assigned id.
| bool RADUi::NotificationModel::triggerAction | ( | uint64_t | id | ) |
Triggers notification action.
| RADCore::Event<void (uint64_t, std::string) > RADUi::NotificationModel::actionTriggered |
Raised when a notification action is triggered.
| RADCore::Event<void () > RADUi::NotificationModel::changed |
Raised when notifications change.