| 1 | // For license of this file, see <project-root-folder>/LICENSE.md. |
| 2 | |
| 3 | #ifndef TOASTNOTIFICATION_H |
| 4 | #define TOASTNOTIFICATION_H |
| 5 | |
| 6 | #include "gui/notifications/basetoastnotification.h" |
| 7 | #include "miscellaneous/application.h" |
| 8 | |
| 9 | #include "ui_toastnotification.h" |
| 10 | |
| 11 | class ToastNotification : public BaseToastNotification { |
| 12 | Q_OBJECT |
| 13 | |
| 14 | public: |
| 15 | explicit ToastNotification(Notification::Event event, |
| 16 | const GuiMessage& msg, |
| 17 | const GuiAction& action, |
| 18 | QWidget* parent = nullptr); |
| 19 | |
| 20 | private: |
| 21 | void loadNotification(Notification::Event event, const GuiMessage& msg, const GuiAction& action); |
| 22 | QIcon iconForType(QSystemTrayIcon::MessageIcon icon) const; |
| 23 | |
| 24 | private: |
| 25 | Ui::ToastNotification m_ui; |
| 26 | }; |
| 27 | |
| 28 | #endif // TOASTNOTIFICATION_H |